mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-12 07:27:29 -06:00
[feature] Application creation + management via API + settings panel
This commit is contained in:
parent
daf60f69a0
commit
e86f7ef0d9
61 changed files with 3016 additions and 252 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue