summaryrefslogtreecommitdiff
path: root/src/server/api/endpoints/admin
diff options
context:
space:
mode:
authorCGsama <CGsama@outlook.com>2020-12-24 08:15:34 -0500
committerGitHub <noreply@github.com>2020-12-24 22:15:34 +0900
commit4fce5d8066631635f3752210cc29b7b756c47c4f (patch)
tree7e19a0691711a5b486a71c5a7266f00adaa2a122 /src/server/api/endpoints/admin
parentMerge pull request #7000 from syuilo/dependabot/npm_and_yarn/eslint-plugin-vu... (diff)
downloadsharkey-4fce5d8066631635f3752210cc29b7b756c47c4f.tar.gz
sharkey-4fce5d8066631635f3752210cc29b7b756c47c4f.tar.bz2
sharkey-4fce5d8066631635f3752210cc29b7b756c47c4f.zip
Showusers order by updateAt NULL considered as max (#7015)
Diffstat (limited to 'src/server/api/endpoints/admin')
-rw-r--r--src/server/api/endpoints/admin/show-users.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/api/endpoints/admin/show-users.ts b/src/server/api/endpoints/admin/show-users.ts
index 294d7208b3..03abe7a57b 100644
--- a/src/server/api/endpoints/admin/show-users.ts
+++ b/src/server/api/endpoints/admin/show-users.ts
@@ -95,8 +95,8 @@ export default define(meta, async (ps, me) => {
case '-follower': query.orderBy('user.followersCount', 'ASC'); break;
case '+createdAt': query.orderBy('user.createdAt', 'DESC'); break;
case '-createdAt': query.orderBy('user.createdAt', 'ASC'); break;
- case '+updatedAt': query.orderBy('user.updatedAt', 'DESC'); break;
- case '-updatedAt': query.orderBy('user.updatedAt', 'ASC'); break;
+ case '+updatedAt': query.orderBy('user.updatedAt', 'DESC', 'NULLS LAST'); break;
+ case '-updatedAt': query.orderBy('user.updatedAt', 'ASC', 'NULLS FIRST'); break;
default: query.orderBy('user.id', 'ASC'); break;
}