Add some tests and fix

This commit is contained in:
syuilo 2018-10-16 09:45:36 +09:00
parent 1c9c4af9f1
commit 4d6335ce9a
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69
2 changed files with 344 additions and 2 deletions

View file

@ -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);