aboutsummaryrefslogtreecommitdiff
path: root/internal/route/api/v1/user/app.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/route/api/v1/user/app.go')
-rw-r--r--internal/route/api/v1/user/app.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/route/api/v1/user/app.go b/internal/route/api/v1/user/app.go
index 5db0175b..fdf11c09 100644
--- a/internal/route/api/v1/user/app.go
+++ b/internal/route/api/v1/user/app.go
@@ -23,7 +23,7 @@ func ListAccessTokens(c *context.APIContext) {
apiTokens := make([]*api.AccessToken, len(tokens))
for i := range tokens {
- apiTokens[i] = &api.AccessToken{tokens[i].Name, tokens[i].Sha1}
+ apiTokens[i] = &api.AccessToken{Name: tokens[i].Name, Sha1: tokens[i].Sha1}
}
c.JSONSuccess(&apiTokens)
}
@@ -41,5 +41,5 @@ func CreateAccessToken(c *context.APIContext, form api.CreateAccessTokenOption)
}
return
}
- c.JSON(http.StatusCreated, &api.AccessToken{t.Name, t.Sha1})
+ c.JSON(http.StatusCreated, &api.AccessToken{Name: t.Name, Sha1: t.Sha1})
}