From 3dde561fe548a71f531de7096c2948426982603c Mon Sep 17 00:00:00 2001 From: Satsuki Yanagi <17376330+u1-liquid@users.noreply.github.com> Date: Mon, 6 May 2019 17:28:55 +0900 Subject: [PATCH] Resolve #4864 (#4865) --- src/server/api/endpoints/users.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/api/endpoints/users.ts b/src/server/api/endpoints/users.ts index c710706f0..be317223b 100644 --- a/src/server/api/endpoints/users.ts +++ b/src/server/api/endpoints/users.ts @@ -85,8 +85,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.andWhere('user.updatedAt IS NOT NULL').orderBy('user.updatedAt', 'DESC'); break; + case '-updatedAt': query.andWhere('user.updatedAt IS NOT NULL').orderBy('user.updatedAt', 'ASC'); break; default: query.orderBy('user.id', 'ASC'); break; }