From e8bee07fc192dac06ae239fc0260e41d37d7394d Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Tue, 16 Jul 2019 17:39:46 +0100 Subject: [PATCH] Clarify that POST publicRooms is implemented --- publicroomsapi/directory/public_rooms.go | 4 ++-- publicroomsapi/routing/routing.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/publicroomsapi/directory/public_rooms.go b/publicroomsapi/directory/public_rooms.go index 100e28e9b..8feca1368 100644 --- a/publicroomsapi/directory/public_rooms.go +++ b/publicroomsapi/directory/public_rooms.go @@ -42,8 +42,8 @@ type publicRoomRes struct { Estimate int64 `json:"total_room_count_estimate,omitempty"` } -// GetPublicRooms implements GET /publicRooms -func GetPublicRooms( +// GetPostPublicRooms implements GET and POST /publicRooms +func GetPostPublicRooms( req *http.Request, publicRoomDatabase *storage.PublicRoomsServerDatabase, ) util.JSONResponse { var limit int16 diff --git a/publicroomsapi/routing/routing.go b/publicroomsapi/routing/routing.go index 3a1c9eb58..422414bc2 100644 --- a/publicroomsapi/routing/routing.go +++ b/publicroomsapi/routing/routing.go @@ -64,7 +64,7 @@ func Setup(apiMux *mux.Router, deviceDB *devices.Database, publicRoomsDB *storag ).Methods(http.MethodPut, http.MethodOptions) r0mux.Handle("/publicRooms", common.MakeExternalAPI("public_rooms", func(req *http.Request) util.JSONResponse { - return directory.GetPublicRooms(req, publicRoomsDB) + return directory.GetPostPublicRooms(req, publicRoomsDB) }), ).Methods(http.MethodGet, http.MethodPost, http.MethodOptions) }