Add some tests and fix
This commit is contained in:
parent
1c9c4af9f1
commit
4d6335ce9a
2 changed files with 344 additions and 2 deletions
|
@ -26,7 +26,7 @@ export default async (user: IUser, note: INote, reaction: string) => new Promise
|
|||
} catch (e) {
|
||||
// duplicate key error
|
||||
if (e.code === 11000) {
|
||||
return res(null);
|
||||
return rej('already reacted');
|
||||
}
|
||||
|
||||
console.error(e);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue