mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-24 14:13:19 +02:00
parent
4f63eb0c7e
commit
07bb8067ae
1 changed files with 5 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
import $ from 'cafy';
|
import $ from 'cafy';
|
||||||
import { ID } from '@/misc/cafy-id';
|
import { ID } from '@/misc/cafy-id';
|
||||||
import define from '../../define';
|
import define from '../../define';
|
||||||
|
import readNote from '@/services/note/read';
|
||||||
import { Antennas, Notes, AntennaNotes } from '@/models/index';
|
import { Antennas, Notes, AntennaNotes } from '@/models/index';
|
||||||
import { makePaginationQuery } from '../../common/make-pagination-query';
|
import { makePaginationQuery } from '../../common/make-pagination-query';
|
||||||
import { generateVisibilityQuery } from '../../common/generate-visibility-query';
|
import { generateVisibilityQuery } from '../../common/generate-visibility-query';
|
||||||
|
@ -84,5 +85,9 @@ export default define(meta, async (ps, user) => {
|
||||||
.take(ps.limit!)
|
.take(ps.limit!)
|
||||||
.getMany();
|
.getMany();
|
||||||
|
|
||||||
|
if (notes.length > 0) {
|
||||||
|
readNote(user.id, notes);
|
||||||
|
}
|
||||||
|
|
||||||
return await Notes.packMany(notes, user);
|
return await Notes.packMany(notes, user);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue