summaryrefslogtreecommitdiff
path: root/internal/api
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2025-04-18 15:37:50 +0000
committerLibravatar GitHub <noreply@github.com>2025-04-18 17:37:50 +0200
commit14899733c8c5962a8b4ed5c13836f86a34bd29a0 (patch)
tree7f707de6beff10d04f8e61f25a36357deb44c75a /internal/api
parent[feature/frontend] Hide "engagement" stats, edits, and other info under a lit... (diff)
downloadgotosocial-14899733c8c5962a8b4ed5c13836f86a34bd29a0.tar.xz
[bugfix] new token API issues (#4022)
* fix incorrect endpoint being registered for /token/{id} * update the maximum page value for tokens endpoint to 100 * update the available tokens page options * set a default limit of 25 to match the first available settings panel option * ensure OnInvalidateToken() hook is called during token delete
Diffstat (limited to 'internal/api')
-rw-r--r--internal/api/client/tokens/tokens.go2
-rw-r--r--internal/api/client/tokens/tokensget.go6
2 files changed, 4 insertions, 4 deletions
diff --git a/internal/api/client/tokens/tokens.go b/internal/api/client/tokens/tokens.go
index ce00a6459..aadaf72c2 100644
--- a/internal/api/client/tokens/tokens.go
+++ b/internal/api/client/tokens/tokens.go
@@ -43,6 +43,6 @@ func New(processor *processing.Processor) *Module {
func (m *Module) Route(attachHandler func(method string, path string, f ...gin.HandlerFunc) gin.IRoutes) {
attachHandler(http.MethodGet, BasePath, m.TokensInfoGETHandler)
- attachHandler(http.MethodGet, BasePathWithID, m.TokensInfoGETHandler)
+ attachHandler(http.MethodGet, BasePathWithID, m.TokenInfoGETHandler)
attachHandler(http.MethodPost, InvalidateTokenPath, m.TokenInvalidatePOSTHandler)
}
diff --git a/internal/api/client/tokens/tokensget.go b/internal/api/client/tokens/tokensget.go
index 15fc5511f..5c92beccc 100644
--- a/internal/api/client/tokens/tokensget.go
+++ b/internal/api/client/tokens/tokensget.go
@@ -117,9 +117,9 @@ func (m *Module) TokensInfoGETHandler(c *gin.Context) {
}
page, errWithCode := paging.ParseIDPage(c,
- 0, // min limit
- 80, // max limit
- 20, // default limit
+ 0, // min limit
+ 100, // max limit
+ 25, // default limit
)
if errWithCode != nil {
apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGetV1)