This commit is contained in:
syuilo
2017-01-17 11:11:22 +09:00
parent caa8aee7a0
commit 9f81288fcc
48 changed files with 91 additions and 140 deletions

View File

@ -29,7 +29,7 @@ module.exports = (params, user, app, isSecure) =>
data: Object.assign(user.data || {}, JSON.parse(data))
}
};
await User.updateOne({ _id: user._id }, set);
await User.update({ _id: user._id }, set);
res(204);
} else {
const appdata = await Appdata.findOne({
@ -41,7 +41,7 @@ module.exports = (params, user, app, isSecure) =>
data: Object.assign((appdata || {}).data || {}, JSON.parse(data))
}
};
await Appdata.updateOne({
await Appdata.update({
app_id: app._id,
user_id: user._id
}, Object.assign({