yumechi-no-kuni/src/services/note/unwatch.ts

10 lines
226 B
TypeScript
Raw Normal View History

2018-11-05 23:58:20 -06:00
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
});
};