Update attached-notes.ts
This commit is contained in:
parent
4f20ee1909
commit
9c774a50f8
1 changed files with 7 additions and 4 deletions
|
@ -2,7 +2,7 @@ import $ from 'cafy';
|
||||||
import { ID } from '../../../../../misc/cafy-id';
|
import { ID } from '../../../../../misc/cafy-id';
|
||||||
import define from '../../../define';
|
import define from '../../../define';
|
||||||
import { ApiError } from '../../../error';
|
import { ApiError } from '../../../error';
|
||||||
import { DriveFiles } from '../../../../../models';
|
import { DriveFiles, Notes } from '../../../../../models';
|
||||||
import { types, bool } from '../../../../../misc/schema';
|
import { types, bool } from '../../../../../misc/schema';
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
|
@ -59,8 +59,11 @@ export default define(meta, async (ps, user) => {
|
||||||
throw new ApiError(meta.errors.noSuchFile);
|
throw new ApiError(meta.errors.noSuchFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* v11 TODO
|
const notes = await Notes.createQueryBuilder('note')
|
||||||
return await packMany(file.metadata.attachedNoteIds || [], user, {
|
.where(':file = ANY(note.fileIds)', { file: file.id })
|
||||||
|
.getMany();
|
||||||
|
|
||||||
|
return await Notes.packMany(notes, user, {
|
||||||
detail: true
|
detail: true
|
||||||
});*/
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue