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()
|
v1mux := apiMux.PathPrefix(pathPrefixV1).Subrouter()
|
||||||
unstableMux := apiMux.PathPrefix(pathPrefixUnstable).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",
|
r0mux.Handle("/createRoom",
|
||||||
common.MakeAuthAPI("createRoom", authData, func(req *http.Request, device *authtypes.Device) util.JSONResponse {
|
common.MakeAuthAPI("createRoom", authData, func(req *http.Request, device *authtypes.Device) util.JSONResponse {
|
||||||
|
|
|
||||||
|
|
@ -139,6 +139,6 @@ func writeEvent(event gomatrixserverlib.Event) {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
} else {
|
} 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{
|
activeThumbnailGeneration := &types.ActiveThumbnailGeneration{
|
||||||
PathToResult: map[string]*types.ThumbnailGenerationResult{},
|
PathToResult: map[string]*types.ThumbnailGenerationResult{},
|
||||||
}
|
}
|
||||||
authData := auth.Data{nil, deviceDB, nil}
|
authData := auth.Data{
|
||||||
|
AccountDB: nil,
|
||||||
|
DeviceDB: deviceDB,
|
||||||
|
AppServices: nil,
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: Add AS support
|
// TODO: Add AS support
|
||||||
r0mux.Handle("/upload", common.MakeAuthAPI(
|
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) {
|
func Setup(apiMux *mux.Router, deviceDB *devices.Database, publicRoomsDB *storage.PublicRoomsServerDatabase) {
|
||||||
r0mux := apiMux.PathPrefix(pathPrefixR0).Subrouter()
|
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}",
|
r0mux.Handle("/directory/list/room/{roomID}",
|
||||||
common.MakeExternalAPI("directory_list", func(req *http.Request) util.JSONResponse {
|
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) {
|
func Setup(apiMux *mux.Router, srp *sync.RequestPool, syncDB *storage.SyncServerDatabase, deviceDB *devices.Database) {
|
||||||
r0mux := apiMux.PathPrefix(pathPrefixR0).Subrouter()
|
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.
|
// TODO: Add AS support for all handlers below.
|
||||||
r0mux.Handle("/sync", common.MakeAuthAPI("sync", authData, func(req *http.Request, device *authtypes.Device) util.JSONResponse {
|
r0mux.Handle("/sync", common.MakeAuthAPI("sync", authData, func(req *http.Request, device *authtypes.Device) util.JSONResponse {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue