From 190a5e175bb12a86773940d44748ed0b159b8c31 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 15 Apr 2019 16:37:54 +0900 Subject: [PATCH] Fix bug --- src/server/api/endpoints/sw/register.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/api/endpoints/sw/register.ts b/src/server/api/endpoints/sw/register.ts index 79bc18bf2..559937ca2 100644 --- a/src/server/api/endpoints/sw/register.ts +++ b/src/server/api/endpoints/sw/register.ts @@ -27,7 +27,6 @@ export const meta = { export default define(meta, async (ps, user) => { // if already subscribed const exist = await SwSubscriptions.findOne({ - createdAt: new Date(), userId: user.id, endpoint: ps.endpoint, auth: ps.auth, @@ -45,6 +44,7 @@ export default define(meta, async (ps, user) => { await SwSubscriptions.save({ id: genId(), + createdAt: new Date(), userId: user.id, endpoint: ps.endpoint, auth: ps.auth,