summaryrefslogtreecommitdiffstats
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, 3 insertions, 3 deletions
diff --git a/routers/api/v1/user/app.go b/routers/api/v1/user/app.go
index 00aacbdc1b..87413becf0 100644
--- a/routers/api/v1/user/app.go
+++ b/routers/api/v1/user/app.go
@@ -8,11 +8,11 @@ import (
api "github.com/gogits/go-gogs-client"
"github.com/gogits/gogs/models"
- "github.com/gogits/gogs/modules/middleware"
+ "github.com/gogits/gogs/modules/context"
)
// https://github.com/gogits/go-gogs-client/wiki/Users#list-access-tokens-for-a-user
-func ListAccessTokens(ctx *middleware.Context) {
+func ListAccessTokens(ctx *context.Context) {
tokens, err := models.ListAccessTokens(ctx.User.Id)
if err != nil {
ctx.APIError(500, "ListAccessTokens", err)
@@ -27,7 +27,7 @@ func ListAccessTokens(ctx *middleware.Context) {
}
// https://github.com/gogits/go-gogs-client/wiki/Users#create-a-access-token
-func CreateAccessToken(ctx *middleware.Context, form api.CreateAccessTokenOption) {
+func CreateAccessToken(ctx *context.Context, form api.CreateAccessTokenOption) {
t := &models.AccessToken{
UID: ctx.User.Id,
Name: form.Name,