diff options
Diffstat (limited to 'internal/api/client/apps/apps.go')
| -rw-r--r-- | internal/api/client/apps/apps.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/internal/api/client/apps/apps.go b/internal/api/client/apps/apps.go index 679b985b8..2071c08bd 100644 --- a/internal/api/client/apps/apps.go +++ b/internal/api/client/apps/apps.go @@ -21,11 +21,14 @@ import ( "net/http" "github.com/gin-gonic/gin" + apiutil "github.com/superseriousbusiness/gotosocial/internal/api/util" "github.com/superseriousbusiness/gotosocial/internal/processing" ) -// BasePath is the base path for this api module, excluding the api prefix -const BasePath = "/v1/apps" +const ( + BasePath = "/v1/apps" + BasePathWithID = BasePath + "/:" + apiutil.IDKey +) type Module struct { processor *processing.Processor @@ -39,4 +42,7 @@ func New(processor *processing.Processor) *Module { func (m *Module) Route(attachHandler func(method string, path string, f ...gin.HandlerFunc) gin.IRoutes) { attachHandler(http.MethodPost, BasePath, m.AppsPOSTHandler) + attachHandler(http.MethodGet, BasePath, m.AppsGETHandler) + attachHandler(http.MethodGet, BasePathWithID, m.AppGETHandler) + attachHandler(http.MethodDelete, BasePathWithID, m.AppDELETEHandler) } |
