diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-11-06 14:58:20 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-11-06 14:58:20 +0900 |
| commit | 37999f4af7ac88e57ae814d64e7e4cb67194fcc6 (patch) | |
| tree | f89741a486d0a9313a235fcb01082e99fc7b54c5 /src/services | |
| parent | Twemojiで合字に対応 (#3140) (diff) | |
| download | sharkey-37999f4af7ac88e57ae814d64e7e4cb67194fcc6.tar.gz sharkey-37999f4af7ac88e57ae814d64e7e4cb67194fcc6.tar.bz2 sharkey-37999f4af7ac88e57ae814d64e7e4cb67194fcc6.zip | |
[API] Implement notes/watching/
Diffstat (limited to 'src/services')
| -rw-r--r-- | src/services/note/unwatch.ts | 9 |
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 + }); +}; |