mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-15 10:53:09 -06:00
Bring code up to date so that it passes lint
This commit is contained in:
parent
20c79e7bf3
commit
9980ef544d
|
|
@ -77,7 +77,11 @@ func Setup(
|
|||
v1mux := apiMux.PathPrefix(pathPrefixV1).Subrouter()
|
||||
unstableMux := apiMux.PathPrefix(pathPrefixUnstable).Subrouter()
|
||||
|
||||
authData := auth.Data{accountDB, deviceDB, cfg.Derived.ApplicationServices}
|
||||
authData := auth.Data{
|
||||
AccountDB: accountDB,
|
||||
DeviceDB: deviceDB,
|
||||
AppServices: cfg.Derived.ApplicationServices,
|
||||
}
|
||||
|
||||
r0mux.Handle("/createRoom",
|
||||
common.MakeAuthAPI("createRoom", authData, func(req *http.Request, device *authtypes.Device) util.JSONResponse {
|
||||
|
|
|
|||
|
|
@ -139,6 +139,6 @@ func writeEvent(event gomatrixserverlib.Event) {
|
|||
panic(err)
|
||||
}
|
||||
} else {
|
||||
panic(fmt.Errorf("Format %q is not valid, must be %q or %q", format, "InputRoomEvent", "Event"))
|
||||
panic(fmt.Errorf("Format %q is not valid, must be %q or %q", *format, "InputRoomEvent", "Event"))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,11 @@ func Setup(
|
|||
activeThumbnailGeneration := &types.ActiveThumbnailGeneration{
|
||||
PathToResult: map[string]*types.ThumbnailGenerationResult{},
|
||||
}
|
||||
authData := auth.Data{nil, deviceDB, nil}
|
||||
authData := auth.Data{
|
||||
AccountDB: nil,
|
||||
DeviceDB: deviceDB,
|
||||
AppServices: nil,
|
||||
}
|
||||
|
||||
// TODO: Add AS support
|
||||
r0mux.Handle("/upload", common.MakeAuthAPI(
|
||||
|
|
|
|||
|
|
@ -33,7 +33,11 @@ const pathPrefixR0 = "/_matrix/client/r0"
|
|||
func Setup(apiMux *mux.Router, deviceDB *devices.Database, publicRoomsDB *storage.PublicRoomsServerDatabase) {
|
||||
r0mux := apiMux.PathPrefix(pathPrefixR0).Subrouter()
|
||||
|
||||
authData := auth.Data{nil, deviceDB, nil}
|
||||
authData := auth.Data{
|
||||
AccountDB: nil,
|
||||
DeviceDB: deviceDB,
|
||||
AppServices: nil,
|
||||
}
|
||||
|
||||
r0mux.Handle("/directory/list/room/{roomID}",
|
||||
common.MakeExternalAPI("directory_list", func(req *http.Request) util.JSONResponse {
|
||||
|
|
|
|||
|
|
@ -33,7 +33,11 @@ const pathPrefixR0 = "/_matrix/client/r0"
|
|||
func Setup(apiMux *mux.Router, srp *sync.RequestPool, syncDB *storage.SyncServerDatabase, deviceDB *devices.Database) {
|
||||
r0mux := apiMux.PathPrefix(pathPrefixR0).Subrouter()
|
||||
|
||||
authData := auth.Data{nil, deviceDB, nil}
|
||||
authData := auth.Data{
|
||||
AccountDB: nil,
|
||||
DeviceDB: deviceDB,
|
||||
AppServices: nil,
|
||||
}
|
||||
|
||||
// TODO: Add AS support for all handlers below.
|
||||
r0mux.Handle("/sync", common.MakeAuthAPI("sync", authData, func(req *http.Request, device *authtypes.Device) util.JSONResponse {
|
||||
|
|
|
|||
Loading…
Reference in a new issue