forked from forgejo/forgejo
Replace convert.To with APIFormat calls
This commit is contained in:
parent
3f7f4852ef
commit
dccb0c15b9
21 changed files with 79 additions and 225 deletions
|
@ -11,7 +11,6 @@ import (
|
|||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/modules/context"
|
||||
"github.com/gogits/gogs/routers/api/v1/convert"
|
||||
)
|
||||
|
||||
func Search(ctx *context.APIContext) {
|
||||
|
@ -67,9 +66,9 @@ func GetInfo(ctx *context.APIContext) {
|
|||
if !ctx.IsSigned {
|
||||
u.Email = ""
|
||||
}
|
||||
ctx.JSON(200, convert.ToUser(u))
|
||||
ctx.JSON(200, u.APIFormat())
|
||||
}
|
||||
|
||||
func GetAuthenticatedUser(ctx *context.APIContext) {
|
||||
ctx.JSON(200, convert.ToUser(ctx.User))
|
||||
ctx.JSON(200, ctx.User.APIFormat())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue