mirror of
https://github.com/hrfee/jfa-go.git
synced 2026-01-18 16:47:42 +01:00
api-users: GetUserCount with app.jf, not userCache
Makes no sense to generate the web user cache for this value.
This commit is contained in:
@@ -903,13 +903,13 @@ func (app *appContext) userSummary(jfUser mediabrowser.User) respUser {
|
||||
// @tags Activity
|
||||
func (app *appContext) GetUserCount(gc *gin.Context) {
|
||||
resp := PageCountDTO{}
|
||||
userList, err := app.userCache.GetUserDTOs(app, false)
|
||||
users, err := app.jf.GetUsers(false)
|
||||
if err != nil {
|
||||
app.err.Printf(lm.FailedGetUsers, lm.Jellyfin, err)
|
||||
respond(500, "Couldn't get users", gc)
|
||||
return
|
||||
}
|
||||
resp.Count = uint64(len(userList))
|
||||
resp.Count = uint64(len(users))
|
||||
gc.JSON(200, resp)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user