aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1/user
diff options
context:
space:
mode:
authortechknowlogick <techknowlogick@gitea.io>2019-05-04 11:45:34 -0400
committerGitHub <noreply@github.com>2019-05-04 11:45:34 -0400
commit46373e765702a203bfcb576c9d3639314ef4965f (patch)
treea44ba4de8593a9ad7898683e0e6df80e0072ef17 /routers/api/v1/user
parent1fa96629461ac4229932b0a4526fc2f60c88ec51 (diff)
downloadgitea-46373e765702a203bfcb576c9d3639314ef4965f.tar.gz
gitea-46373e765702a203bfcb576c9d3639314ef4965f.zip
Hash App token (#6724)
Diffstat (limited to 'routers/api/v1/user')
-rw-r--r--routers/api/v1/user/app.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/routers/api/v1/user/app.go b/routers/api/v1/user/app.go
index ef53e95d8b..d9716f419a 100644
--- a/routers/api/v1/user/app.go
+++ b/routers/api/v1/user/app.go
@@ -37,9 +37,9 @@ func ListAccessTokens(ctx *context.APIContext) {
apiTokens := make([]*api.AccessToken, len(tokens))
for i := range tokens {
apiTokens[i] = &api.AccessToken{
- ID: tokens[i].ID,
- Name: tokens[i].Name,
- Sha1: tokens[i].Sha1,
+ ID: tokens[i].ID,
+ Name: tokens[i].Name,
+ TokenLastEight: tokens[i].TokenLastEight,
}
}
ctx.JSON(200, &apiTokens)
@@ -81,9 +81,9 @@ func CreateAccessToken(ctx *context.APIContext, form api.CreateAccessTokenOption
return
}
ctx.JSON(201, &api.AccessToken{
- Name: t.Name,
- Sha1: t.Sha1,
- ID: t.ID,
+ Name: t.Name,
+ Token: t.Token,
+ ID: t.ID,
})
}