mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-22 12:13:48 +01:00
Improve local timeline API
This commit is contained in:
parent
dd3fbed38a
commit
53f39a388f
@ -23,6 +23,12 @@ export const meta = {
|
||||
}
|
||||
}),
|
||||
|
||||
fileType: $.arr($.str).optional.note({
|
||||
desc: {
|
||||
'ja-JP': '指定された種類のファイルが添付された投稿のみを取得します'
|
||||
}
|
||||
}),
|
||||
|
||||
limit: $.num.optional.range(1, 100).note({
|
||||
default: 10
|
||||
}),
|
||||
@ -84,6 +90,14 @@ export default async (params: any, user: ILocalUser) => {
|
||||
query.fileIds = { $exists: true, $ne: [] };
|
||||
}
|
||||
|
||||
if (ps.fileType) {
|
||||
query.fileIds = { $exists: true, $ne: [] };
|
||||
|
||||
query['_files.contentType'] = {
|
||||
$in: ps.fileType
|
||||
};
|
||||
}
|
||||
|
||||
if (ps.sinceId) {
|
||||
sort._id = 1;
|
||||
query._id = {
|
||||
|
Loading…
Reference in New Issue
Block a user