[API] Implement notes/watching/

This commit is contained in:
syuilo
2018-11-06 14:58:20 +09:00
parent 3b6ab327c1
commit 37999f4af7
3 changed files with 97 additions and 0 deletions

View File

@@ -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
});
};