✌️
This commit is contained in:
parent
f89c3af982
commit
6a5c6280ff
19 changed files with 150 additions and 11 deletions
|
|
@ -21,7 +21,7 @@ module.exports = (params, user, app, isSecure) => new Promise(async (res, rej) =
|
|||
const [data, dataError] = $(params.data).optional.object()
|
||||
.pipe(obj => {
|
||||
const hasInvalidData = Object.entries(obj).some(([k, v]) =>
|
||||
$(k).string().match(/^[a-z_]+$/).isNg() && $(v).string().isNg());
|
||||
$(k).string().match(/^[a-z_]+$/).nok() && $(v).string().nok());
|
||||
return !hasInvalidData;
|
||||
}).$;
|
||||
if (dataError) return rej('invalid data param');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue