wip
This commit is contained in:
parent
d53d45f797
commit
11439afde7
54 changed files with 260 additions and 260 deletions
|
@ -38,11 +38,11 @@ module.exports = (params: any, user: ILocalUser) => new Promise(async (res, rej)
|
|||
}
|
||||
|
||||
// Get 'text' parameter
|
||||
const [text, textErr] = $.str.optional().pipe(isValidText).get(params.text);
|
||||
const [text, textErr] = $.str.optional.pipe(isValidText).get(params.text);
|
||||
if (textErr) return rej('invalid text');
|
||||
|
||||
// Get 'fileId' parameter
|
||||
const [fileId, fileIdErr] = $.type(ID).optional().get(params.fileId);
|
||||
const [fileId, fileIdErr] = $.type(ID).optional.get(params.fileId);
|
||||
if (fileIdErr) return rej('invalid fileId param');
|
||||
|
||||
let file = null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue