mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-27 06:53:03 +00:00
Better index
This commit is contained in:
parent
80b5fda292
commit
2e9bbf389e
1 changed files with 2 additions and 1 deletions
|
@ -1,7 +1,8 @@
|
||||||
import db from '../db/mongodb';
|
import db from '../db/mongodb';
|
||||||
|
|
||||||
const Emoji = db.get<IEmoji>('emoji');
|
const Emoji = db.get<IEmoji>('emoji');
|
||||||
|
Emoji.createIndex('name');
|
||||||
|
Emoji.createIndex('host');
|
||||||
Emoji.createIndex(['name', 'host'], { unique: true });
|
Emoji.createIndex(['name', 'host'], { unique: true });
|
||||||
|
|
||||||
export default Emoji;
|
export default Emoji;
|
||||||
|
|
Loading…
Reference in a new issue