Refactoring

This commit is contained in:
syuilo
2017-05-24 20:50:17 +09:00
parent 5a3cd80973
commit caeba1197c
16 changed files with 84 additions and 206 deletions

View File

@ -34,7 +34,7 @@ module.exports = (params, user, app, isSecure) => new Promise(async (res, rej) =
const [value, valueError] = $(params.value).optional.string().$;
if (valueError) return rej('invalid value param');
let set = {};
const set = {};
if (data) {
Object.entries(data).forEach(([k, v]) => {
set[`data.${k}`] = v;