互換性のためのコードを追加 & #2623
This commit is contained in:
parent
229e85b2c5
commit
b5ff2abdb9
8 changed files with 435 additions and 284 deletions
|
@ -69,7 +69,13 @@ export const meta = {
|
|||
|
||||
withFiles: $.bool.optional.note({
|
||||
desc: {
|
||||
'ja-JP': 'true にすると、メディアが添付された投稿だけ取得します'
|
||||
'ja-JP': 'true にすると、ファイルが添付された投稿だけ取得します'
|
||||
}
|
||||
}),
|
||||
|
||||
mediaOnly: $.bool.optional.note({
|
||||
desc: {
|
||||
'ja-JP': 'true にすると、ファイルが添付された投稿だけ取得します (このパラメータは廃止予定です。代わりに withFiles を使ってください。)'
|
||||
}
|
||||
}),
|
||||
}
|
||||
|
@ -193,7 +199,9 @@ export default async (params: any, user: ILocalUser) => {
|
|||
});
|
||||
}
|
||||
|
||||
if (ps.withFiles) {
|
||||
const withFiles = ps.withFiles != null ? ps.withFiles : ps.mediaOnly;
|
||||
|
||||
if (withFiles) {
|
||||
query.$and.push({
|
||||
fileIds: { $exists: true, $ne: [] }
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue