mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-05-31 12:00:01 +02:00
golint fixed for routers (#208)
This commit is contained in:
parent
3a3782bb7f
commit
3917ed45de
35 changed files with 354 additions and 155 deletions
|
@ -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())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue