aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1/user/app.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/user/app.go')
-rw-r--r--routers/api/v1/user/app.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/routers/api/v1/user/app.go b/routers/api/v1/user/app.go
index e678aaff53..2955f78a77 100644
--- a/routers/api/v1/user/app.go
+++ b/routers/api/v1/user/app.go
@@ -11,7 +11,8 @@ import (
"code.gitea.io/gitea/modules/context"
)
-// https://github.com/gogits/go-gogs-client/wiki/Users#list-access-tokens-for-a-user
+// ListAccessTokens list all the access tokens
+// see https://github.com/gogits/go-gogs-client/wiki/Users#list-access-tokens-for-a-user
func ListAccessTokens(ctx *context.APIContext) {
tokens, err := models.ListAccessTokens(ctx.User.ID)
if err != nil {
@@ -26,7 +27,8 @@ func ListAccessTokens(ctx *context.APIContext) {
ctx.JSON(200, &apiTokens)
}
-// https://github.com/gogits/go-gogs-client/wiki/Users#create-a-access-token
+// CreateAccessToken create access tokens
+// see https://github.com/gogits/go-gogs-client/wiki/Users#create-a-access-token
func CreateAccessToken(ctx *context.APIContext, form api.CreateAccessTokenOption) {
t := &models.AccessToken{
UID: ctx.User.ID,