X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmodels%2Fuser%2Fuser.ts;h=20c2222a78e16074e36c67be3f37fbf5092607bb;hb=e771ff815dba3b4a95633f4e1e10dacd222dfe61;hp=326b2e789c59b24dfe25e00972ff85660efad7de;hpb=d493e2d4bf0ace177d15e9173d1c02df8c100558;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/models/user/user.ts b/server/models/user/user.ts index 326b2e789..20c2222a7 100644 --- a/server/models/user/user.ts +++ b/server/models/user/user.ts @@ -66,7 +66,7 @@ import { ActorModel } from '../actor/actor' import { ActorFollowModel } from '../actor/actor-follow' import { ActorImageModel } from '../actor/actor-image' import { OAuthTokenModel } from '../oauth/oauth-token' -import { getSort, throwIfNotValid } from '../utils' +import { getAdminUsersSort, throwIfNotValid } from '../utils' import { VideoModel } from '../video/video' import { VideoChannelModel } from '../video/video-channel' import { VideoImportModel } from '../video/video-import' @@ -461,7 +461,7 @@ export class UserModel extends Model>> { return this.count() } - static listForApi (parameters: { + static listForAdminApi (parameters: { start: number count: number sort: string @@ -497,7 +497,7 @@ export class UserModel extends Model>> { const query: FindOptions = { offset: start, limit: count, - order: getSort(sort), + order: getAdminUsersSort(sort), where }