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:
+2
-2
@@ -903,13 +903,13 @@ func (app *appContext) userSummary(jfUser mediabrowser.User) respUser {
|
|||||||
// @tags Activity
|
// @tags Activity
|
||||||
func (app *appContext) GetUserCount(gc *gin.Context) {
|
func (app *appContext) GetUserCount(gc *gin.Context) {
|
||||||
resp := PageCountDTO{}
|
resp := PageCountDTO{}
|
||||||
userList, err := app.userCache.GetUserDTOs(app, false)
|
users, err := app.jf.GetUsers(false)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
app.err.Printf(lm.FailedGetUsers, lm.Jellyfin, err)
|
app.err.Printf(lm.FailedGetUsers, lm.Jellyfin, err)
|
||||||
respond(500, "Couldn't get users", gc)
|
respond(500, "Couldn't get users", gc)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
resp.Count = uint64(len(userList))
|
resp.Count = uint64(len(users))
|
||||||
gc.JSON(200, resp)
|
gc.JSON(200, resp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -53,7 +53,7 @@ const (
|
|||||||
|
|
||||||
type Activity struct {
|
type Activity struct {
|
||||||
ID string `badgerhold:"key"`
|
ID string `badgerhold:"key"`
|
||||||
Type ActivityType `badgerhold:"index"`
|
Type ActivityType `badgerhold:"index"` // Index by type for quicker filtering
|
||||||
UserID string // ID of target user. For account creation, this will be the newly created account
|
UserID string // ID of target user. For account creation, this will be the newly created account
|
||||||
SourceType ActivitySource
|
SourceType ActivitySource
|
||||||
Source string
|
Source string
|
||||||
|
|||||||
Reference in New Issue
Block a user