This commit is contained in:
syuilo
2018-07-05 23:36:07 +09:00
parent d53d45f797
commit 11439afde7
54 changed files with 260 additions and 260 deletions

View File

@@ -9,7 +9,7 @@ import { ILocalUser } from '../../../../models/user';
*/
module.exports = (params: any, user: ILocalUser) => new Promise(async (res, rej) => {
// 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');
const mute = await Mute.find({