summaryrefslogtreecommitdiff
path: root/src/api/common/read-notification.ts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2018-03-28 17:05:36 +0900
committerGitHub <noreply@github.com>2018-03-28 17:05:36 +0900
commit46e530ef41bb640cfa66438e888d1ecd6f90f6bb (patch)
treea23eefae5e437ad6adc7dfe190daba81138aa70b /src/api/common/read-notification.ts
parent#1294 (diff)
parentoops (diff)
downloadsharkey-46e530ef41bb640cfa66438e888d1ecd6f90f6bb.tar.gz
sharkey-46e530ef41bb640cfa66438e888d1ecd6f90f6bb.tar.bz2
sharkey-46e530ef41bb640cfa66438e888d1ecd6f90f6bb.zip
Merge pull request #1324 from syuilo/#1288-2
snake_case を camelCase にするなどした
Diffstat (limited to 'src/api/common/read-notification.ts')
-rw-r--r--src/api/common/read-notification.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/api/common/read-notification.ts b/src/api/common/read-notification.ts
index 3009cc5d08..5bbf136323 100644
--- a/src/api/common/read-notification.ts
+++ b/src/api/common/read-notification.ts
@@ -29,10 +29,10 @@ export default (
// Update documents
await Notification.update({
_id: { $in: ids },
- is_read: false
+ isRead: false
}, {
$set: {
- is_read: true
+ isRead: true
}
}, {
multi: true
@@ -41,8 +41,8 @@ export default (
// Calc count of my unread notifications
const count = await Notification
.count({
- notifiee_id: userId,
- is_read: false
+ notifieeId: userId,
+ isRead: false
});
if (count == 0) {