✌️
This commit is contained in:
parent
8ed30d1ff3
commit
2105e4964b
5 changed files with 19 additions and 2 deletions
|
@ -2,6 +2,7 @@ import * as mongo from 'mongodb';
|
|||
import db from '../db/mongodb';
|
||||
|
||||
const Favorite = db.get<IFavorite>('favorites');
|
||||
Favorite.createIndex(['userId', 'noteId'], { unique: true });
|
||||
export default Favorite;
|
||||
|
||||
export type IFavorite = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue