summaryrefslogtreecommitdiff
path: root/src/models
diff options
context:
space:
mode:
authorMeiMei <30769358+mei23@users.noreply.github.com>2019-05-12 09:37:00 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2019-05-12 09:37:00 +0900
commit410b9ad6bcde756e5cdf13f55711199027dfc7a6 (patch)
tree97df10c9457b3908f6a8ca432142e71bdea6e870 /src/models
parentFix #4875 (#4899) (diff)
downloadsharkey-410b9ad6bcde756e5cdf13f55711199027dfc7a6.tar.gz
sharkey-410b9ad6bcde756e5cdf13f55711199027dfc7a6.tar.bz2
sharkey-410b9ad6bcde756e5cdf13f55711199027dfc7a6.zip
Fix: ピン留め投稿の表示順がおかしい (#4906)
* Fix: syuilo#4904 * fix comment
Diffstat (limited to 'src/models')
-rw-r--r--src/models/repositories/user.ts5
1 files changed, 4 insertions, 1 deletions
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<User> {
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;