From 410b9ad6bcde756e5cdf13f55711199027dfc7a6 Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Sun, 12 May 2019 09:37:00 +0900 Subject: Fix: ピン留め投稿の表示順がおかしい (#4906) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix: syuilo#4904 * fix comment --- src/models/repositories/user.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/models') diff --git a/src/models/repositories/user.ts b/src/models/repositories/user.ts index 33eb53612a..330220fb72 100644 --- a/src/models/repositories/user.ts +++ b/src/models/repositories/user.ts @@ -72,7 +72,10 @@ export class UserRepository extends Repository { const meId = me ? typeof me === 'string' ? me : me.id : null; const relation = meId && (meId !== user.id) && opts.detail ? await this.getRelation(meId, user.id) : null; - const pins = opts.detail ? await UserNotePinings.find({ userId: user.id }) : []; + const pins = opts.detail ? await UserNotePinings.find({ + where: { userId: user.id }, + order: { id: 'DESC' } + }) : []; const profile = opts.detail ? await UserProfiles.findOne(user.id).then(ensure) : null; const falsy = opts.detail ? false : undefined; -- cgit v1.2.3-freya