aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/user/user.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-05-24 15:05:39 +0200
committerChocobozzz <me@florianbigard.com>2022-05-24 15:29:17 +0200
commit87a0cac618c8ed4a09408273d0f5a468530e8062 (patch)
treeadba163a7628c5d1604c0741c82b6dc22b751249 /server/models/user/user.ts
parent3eba7ab8154027621989cdd4814bc749d79bf0c9 (diff)
downloadPeerTube-87a0cac618c8ed4a09408273d0f5a468530e8062.tar.gz
PeerTube-87a0cac618c8ed4a09408273d0f5a468530e8062.tar.zst
PeerTube-87a0cac618c8ed4a09408273d0f5a468530e8062.zip
Improve admin users list table
* Fix last login sort with null values * Remember last selected columns * Display last login date by default
Diffstat (limited to 'server/models/user/user.ts')
-rw-r--r--server/models/user/user.ts6
1 files changed, 3 insertions, 3 deletions
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'
66import { ActorFollowModel } from '../actor/actor-follow' 66import { ActorFollowModel } from '../actor/actor-follow'
67import { ActorImageModel } from '../actor/actor-image' 67import { ActorImageModel } from '../actor/actor-image'
68import { OAuthTokenModel } from '../oauth/oauth-token' 68import { OAuthTokenModel } from '../oauth/oauth-token'
69import { getSort, throwIfNotValid } from '../utils' 69import { getAdminUsersSort, throwIfNotValid } from '../utils'
70import { VideoModel } from '../video/video' 70import { VideoModel } from '../video/video'
71import { VideoChannelModel } from '../video/video-channel' 71import { VideoChannelModel } from '../video/video-channel'
72import { VideoImportModel } from '../video/video-import' 72import { VideoImportModel } from '../video/video-import'
@@ -461,7 +461,7 @@ export class UserModel extends Model<Partial<AttributesOnly<UserModel>>> {
461 return this.count() 461 return this.count()
462 } 462 }
463 463
464 static listForApi (parameters: { 464 static listForAdminApi (parameters: {
465 start: number 465 start: number
466 count: number 466 count: number
467 sort: string 467 sort: string
@@ -497,7 +497,7 @@ export class UserModel extends Model<Partial<AttributesOnly<UserModel>>> {
497 const query: FindOptions = { 497 const query: FindOptions = {
498 offset: start, 498 offset: start,
499 limit: count, 499 limit: count,
500 order: getSort(sort), 500 order: getAdminUsersSort(sort),
501 where 501 where
502 } 502 }
503 503