Skip to content
Snippets Groups Projects
Commit 85d98f1e authored by syuilo's avatar syuilo
Browse files

Add index

parent 3cf6eab1
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@ import * as mongo from 'mongodb';
import db from '../db/mongodb';
const PostWatching = db.get<IPostWatching>('postWatching');
PostWatching.createIndex(['userId', 'postId'], { unique: true });
export default PostWatching;
export interface IPostWatching {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment