[API] Implement notes/watching/
This commit is contained in:
9
src/services/note/unwatch.ts
Normal file
9
src/services/note/unwatch.ts
Normal 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
|
||||
});
|
||||
};
|
Reference in New Issue
Block a user