Skip to content
Snippets Groups Projects
Unverified Commit e2c6227f authored by syuilo's avatar syuilo
Browse files

Improve local timeline API

parent b5ff2abd
No related branches found
No related tags found
No related merge requests found
......@@ -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 = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment