mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-27 06:43:09 +02:00
type指定廃止
This commit is contained in:
parent
dfa5cb567f
commit
ce0f6f7ebe
1 changed files with 0 additions and 10 deletions
|
@ -19,10 +19,6 @@ export default (params: any, user: ILocalUser) => new Promise(async (res, rej) =
|
||||||
const [markAsRead = true, markAsReadErr] = $.bool.optional.get(params.markAsRead);
|
const [markAsRead = true, markAsReadErr] = $.bool.optional.get(params.markAsRead);
|
||||||
if (markAsReadErr) return rej('invalid markAsRead param');
|
if (markAsReadErr) return rej('invalid markAsRead param');
|
||||||
|
|
||||||
// Get 'type' parameter
|
|
||||||
const [type, typeErr] = $.arr($.str).optional.unique().get(params.type);
|
|
||||||
if (typeErr) return rej('invalid type param');
|
|
||||||
|
|
||||||
// Get 'limit' parameter
|
// Get 'limit' parameter
|
||||||
const [limit = 10, limitErr] = $.num.optional.range(1, 100).get(params.limit);
|
const [limit = 10, limitErr] = $.num.optional.range(1, 100).get(params.limit);
|
||||||
if (limitErr) return rej('invalid limit param');
|
if (limitErr) return rej('invalid limit param');
|
||||||
|
@ -68,12 +64,6 @@ export default (params: any, user: ILocalUser) => new Promise(async (res, rej) =
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type) {
|
|
||||||
query.type = {
|
|
||||||
$in: type
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sinceId) {
|
if (sinceId) {
|
||||||
sort._id = 1;
|
sort._id = 1;
|
||||||
query._id = {
|
query._id = {
|
||||||
|
|
Loading…
Reference in a new issue