summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/user
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2022-01-20 18:46:10 +0100
committerGitHub <noreply@github.com>2022-01-20 18:46:10 +0100
commit54e9ee37a7a301dbe74d46fd3c87712e6120e9bf (patch)
tree1be12fb072625c1b896b9d72f7912b018aad502b /routers/api/v1/user
parent1d98d205f5825f40110e6628b61a97c91ac7f72d (diff)
downloadgitea-54e9ee37a7a301dbe74d46fd3c87712e6120e9bf.tar.gz
gitea-54e9ee37a7a301dbe74d46fd3c87712e6120e9bf.zip
format with gofumpt (#18184)
* gofumpt -w -l . * gofumpt -w -l -extra . * Add linter * manual fix * change make fmt
Diffstat (limited to 'routers/api/v1/user')
-rw-r--r--routers/api/v1/user/gpg_key.go10
-rw-r--r--routers/api/v1/user/watch.go1
2 files changed, 5 insertions, 6 deletions
diff --git a/routers/api/v1/user/gpg_key.go b/routers/api/v1/user/gpg_key.go
index a90e8c30f0..26aeeeabf9 100644
--- a/routers/api/v1/user/gpg_key.go
+++ b/routers/api/v1/user/gpg_key.go
@@ -39,7 +39,7 @@ func listGPGKeys(ctx *context.APIContext, uid int64, listOptions db.ListOptions)
ctx.JSON(http.StatusOK, &apiKeys)
}
-//ListGPGKeys get the GPG key list of a user
+// ListGPGKeys get the GPG key list of a user
func ListGPGKeys(ctx *context.APIContext) {
// swagger:operation GET /users/{username}/gpg_keys user userListGPGKeys
// ---
@@ -71,7 +71,7 @@ func ListGPGKeys(ctx *context.APIContext) {
listGPGKeys(ctx, user.ID, utils.GetListOptions(ctx))
}
-//ListMyGPGKeys get the GPG key list of the authenticated user
+// ListMyGPGKeys get the GPG key list of the authenticated user
func ListMyGPGKeys(ctx *context.APIContext) {
// swagger:operation GET /user/gpg_keys user userCurrentListGPGKeys
// ---
@@ -94,7 +94,7 @@ func ListMyGPGKeys(ctx *context.APIContext) {
listGPGKeys(ctx, ctx.User.ID, utils.GetListOptions(ctx))
}
-//GetGPGKey get the GPG key based on a id
+// GetGPGKey get the GPG key based on a id
func GetGPGKey(ctx *context.APIContext) {
// swagger:operation GET /user/gpg_keys/{id} user userCurrentGetGPGKey
// ---
@@ -212,7 +212,7 @@ type swaggerUserCurrentPostGPGKey struct {
Form api.CreateGPGKeyOption
}
-//CreateGPGKey create a GPG key belonging to the authenticated user
+// CreateGPGKey create a GPG key belonging to the authenticated user
func CreateGPGKey(ctx *context.APIContext) {
// swagger:operation POST /user/gpg_keys user userCurrentPostGPGKey
// ---
@@ -233,7 +233,7 @@ func CreateGPGKey(ctx *context.APIContext) {
CreateUserGPGKey(ctx, *form, ctx.User.ID)
}
-//DeleteGPGKey remove a GPG key belonging to the authenticated user
+// DeleteGPGKey remove a GPG key belonging to the authenticated user
func DeleteGPGKey(ctx *context.APIContext) {
// swagger:operation DELETE /user/gpg_keys/{id} user userCurrentDeleteGPGKey
// ---
diff --git a/routers/api/v1/user/watch.go b/routers/api/v1/user/watch.go
index 6c3e1c86fa..49b1d47d95 100644
--- a/routers/api/v1/user/watch.go
+++ b/routers/api/v1/user/watch.go
@@ -170,7 +170,6 @@ func Watch(ctx *context.APIContext) {
URL: subscriptionURL(ctx.Repo.Repository),
RepositoryURL: ctx.Repo.Repository.APIURL(),
})
-
}
// Unwatch the repo specified in ctx, as the authenticated user