mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
[refactor] Unify the export of user data via API (#15144)
* [refactor] unify how user data is exported via API * test time via unix timestamp
This commit is contained in:
@@ -337,7 +337,7 @@ func GetTeamMembers(ctx *context.APIContext) {
|
||||
}
|
||||
members := make([]*api.User, len(team.Members))
|
||||
for i, member := range team.Members {
|
||||
members[i] = convert.ToUser(member, ctx.IsSigned, ctx.User.IsAdmin)
|
||||
members[i] = convert.ToUser(member, ctx.User)
|
||||
}
|
||||
ctx.JSON(http.StatusOK, members)
|
||||
}
|
||||
@@ -380,7 +380,7 @@ func GetTeamMember(ctx *context.APIContext) {
|
||||
ctx.NotFound()
|
||||
return
|
||||
}
|
||||
ctx.JSON(http.StatusOK, convert.ToUser(u, ctx.IsSigned, ctx.User.IsAdmin))
|
||||
ctx.JSON(http.StatusOK, convert.ToUser(u, ctx.User))
|
||||
}
|
||||
|
||||
// AddTeamMember api for add a member to a team
|
||||
|
Reference in New Issue
Block a user