mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 10:18:38 +00:00
golint fixed for routers (#208)
This commit is contained in:
@@ -13,6 +13,7 @@ import (
|
||||
"code.gitea.io/gitea/modules/context"
|
||||
)
|
||||
|
||||
// Search search users
|
||||
func Search(ctx *context.APIContext) {
|
||||
opts := &models.SearchUserOptions{
|
||||
Keyword: ctx.Query("q"),
|
||||
@@ -51,6 +52,7 @@ func Search(ctx *context.APIContext) {
|
||||
})
|
||||
}
|
||||
|
||||
// GetInfo get user's information
|
||||
func GetInfo(ctx *context.APIContext) {
|
||||
u, err := models.GetUserByName(ctx.Params(":username"))
|
||||
if err != nil {
|
||||
@@ -69,6 +71,7 @@ func GetInfo(ctx *context.APIContext) {
|
||||
ctx.JSON(200, u.APIFormat())
|
||||
}
|
||||
|
||||
// GetAuthenticatedUser get curent user's information
|
||||
func GetAuthenticatedUser(ctx *context.APIContext) {
|
||||
ctx.JSON(200, ctx.User.APIFormat())
|
||||
}
|
||||
|
Reference in New Issue
Block a user