summaryrefslogtreecommitdiff
path: root/src/services/note/unwatch.ts
blob: ef5783231b05ee26d1410cfbb8d1a6a8f6549cd9 (plain)
1
2
3
4
5
6
7
8
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
	});
};