parent
24c6dff3e4
commit
410b9ad6bc
3 changed files with 15 additions and 3 deletions
|
@ -21,7 +21,10 @@ export default async (ctx: Router.IRouterContext) => {
|
|||
return;
|
||||
}
|
||||
|
||||
const pinings = await UserNotePinings.find({ userId: user.id });
|
||||
const pinings = await UserNotePinings.find({
|
||||
where: { userId: user.id },
|
||||
order: { id: 'DESC' }
|
||||
});
|
||||
|
||||
const pinnedNotes = await Promise.all(pinings.map(pining =>
|
||||
Notes.findOne(pining.noteId).then(ensure)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue