This commit is contained in:
syuilo 2018-03-28 16:39:14 +09:00
parent 7d4d9dbaa6
commit 3d5cdb8d2d
237 changed files with 1661 additions and 1354 deletions

View file

@ -28,11 +28,11 @@ module.exports = async (params, user, _, isSecure) => new Promise(async (res, re
// if already subscribed
const exist = await Subscription.findOne({
user_id: user._id,
userId: user._id,
endpoint: endpoint,
auth: auth,
publickey: publickey,
deleted_at: { $exists: false }
deletedAt: { $exists: false }
});
if (exist !== null) {
@ -40,7 +40,7 @@ module.exports = async (params, user, _, isSecure) => new Promise(async (res, re
}
await Subscription.insert({
user_id: user._id,
userId: user._id,
endpoint: endpoint,
auth: auth,
publickey: publickey