fix lint
This commit is contained in:
@ -11,13 +11,13 @@ export const meta = {
|
||||
params: {
|
||||
limit: {
|
||||
validator: $.optional.num.range(1, 100),
|
||||
default: 10
|
||||
default: 10,
|
||||
},
|
||||
|
||||
offset: {
|
||||
validator: $.optional.num.min(0),
|
||||
default: 0
|
||||
}
|
||||
default: 0,
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
@ -26,9 +26,9 @@ export const meta = {
|
||||
items: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'Note'
|
||||
}
|
||||
}
|
||||
ref: 'Note',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export default define(meta, async (ps, user) => {
|
||||
@ -68,10 +68,10 @@ export default define(meta, async (ps, user) => {
|
||||
if (polls.length === 0) return [];
|
||||
|
||||
const notes = await Notes.find({
|
||||
id: In(polls.map(poll => poll.noteId))
|
||||
id: In(polls.map(poll => poll.noteId)),
|
||||
});
|
||||
|
||||
return await Notes.packMany(notes, user, {
|
||||
detail: true
|
||||
detail: true,
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user