mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-15 10:53:09 -06:00
Improve documentation
This commit is contained in:
parent
0e57d246fc
commit
ce9a697dca
|
|
@ -89,7 +89,7 @@ type RoomserverQueryAPIDatabase interface {
|
|||
) (map[types.EventStateKeyNID]string, error)
|
||||
// Lookup if the roomID has been reserved, and when that reservation was made.
|
||||
GetRoomIDReserved(ctx context.Context, roomID string) (time.Time, error)
|
||||
// Reserve the room ID.
|
||||
// Mark the room ID as reserved.
|
||||
ReserveRoomID(ctx context.Context, roomID string) (success bool, err error)
|
||||
}
|
||||
|
||||
|
|
@ -662,7 +662,10 @@ func getAuthChain(
|
|||
return authEvents, nil
|
||||
}
|
||||
|
||||
// QueryReserveRoomID implements api.RoomserverQueryAPI
|
||||
// QueryReserveRoomID marks the given roomID as reserved if it is not
|
||||
// yet already reserved. Fails if the room already exists or ID is
|
||||
// already reserved.
|
||||
// Implements api.RoomserverQueryAPI
|
||||
func (r *RoomserverQueryAPI) QueryReserveRoomID(
|
||||
ctx context.Context,
|
||||
request *api.QueryReserveRoomIDRequest,
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
package roomserver
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/matrix-org/dendrite/roomserver/api"
|
||||
|
|
@ -36,6 +37,7 @@ func SetupRoomServerComponent(
|
|||
base *basecomponent.BaseDendrite,
|
||||
) (api.RoomserverAliasAPI, api.RoomserverInputAPI, api.RoomserverQueryAPI) {
|
||||
roomserverDB, err := storage.Open(string(base.Cfg.Database.RoomServer))
|
||||
fmt.Println(base.Cfg.Database)
|
||||
if err != nil {
|
||||
logrus.WithError(err).Panicf("failed to connect to room server db")
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue