summaryrefslogtreecommitdiff
path: root/src/services/note
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-11-06 14:58:20 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-11-06 14:58:20 +0900
commit37999f4af7ac88e57ae814d64e7e4cb67194fcc6 (patch)
treef89741a486d0a9313a235fcb01082e99fc7b54c5 /src/services/note
parentTwemojiで合字に対応 (#3140) (diff)
downloadsharkey-37999f4af7ac88e57ae814d64e7e4cb67194fcc6.tar.gz
sharkey-37999f4af7ac88e57ae814d64e7e4cb67194fcc6.tar.bz2
sharkey-37999f4af7ac88e57ae814d64e7e4cb67194fcc6.zip
[API] Implement notes/watching/
Diffstat (limited to 'src/services/note')
-rw-r--r--src/services/note/unwatch.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/services/note/unwatch.ts b/src/services/note/unwatch.ts
new file mode 100644
index 0000000000..ef5783231b
--- /dev/null
+++ b/src/services/note/unwatch.ts
@@ -0,0 +1,9 @@
+import * as mongodb from 'mongodb';
+import Watching from '../../models/note-watching';
+
+export default async (me: mongodb.ObjectID, note: object) => {
+ await Watching.remove({
+ noteId: (note as any)._id,
+ userId: me
+ });
+};