✌️
This commit is contained in:
@ -99,6 +99,12 @@ export const meta = {
|
||||
'ja-JP': 'true にすると、ファイルが添付された投稿だけ取得します (このパラメータは廃止予定です。代わりに withFiles を使ってください。)'
|
||||
}
|
||||
}),
|
||||
|
||||
fileType: $.arr($.str).optional.note({
|
||||
desc: {
|
||||
'ja-JP': '指定された種類のファイルが添付された投稿のみを取得します'
|
||||
}
|
||||
}),
|
||||
}
|
||||
};
|
||||
|
||||
@ -137,7 +143,8 @@ export default (params: any, me: ILocalUser) => new Promise(async (res, rej) =>
|
||||
|
||||
const query = {
|
||||
deletedAt: null,
|
||||
userId: user._id
|
||||
userId: user._id,
|
||||
visibility: { $in: ['public', 'home'] }
|
||||
} as any;
|
||||
|
||||
if (ps.sinceId) {
|
||||
@ -172,6 +179,14 @@ export default (params: any, me: ILocalUser) => new Promise(async (res, rej) =>
|
||||
$ne: []
|
||||
};
|
||||
}
|
||||
|
||||
if (ps.fileType) {
|
||||
query.fileIds = { $exists: true, $ne: [] };
|
||||
|
||||
query['_files.contentType'] = {
|
||||
$in: ps.fileType
|
||||
};
|
||||
}
|
||||
//#endregion
|
||||
|
||||
// Issue query
|
||||
|
Reference in New Issue
Block a user