From 87a0cac618c8ed4a09408273d0f5a468530e8062 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 24 May 2022 15:05:39 +0200 Subject: Improve admin users list table * Fix last login sort with null values * Remember last selected columns * Display last login date by default --- server/models/user/user.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'server/models/user') 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 } -- cgit v1.2.3