parent
f5d43b1f25
commit
71878f93e4
5 changed files with 3 additions and 20 deletions
|
@ -40,12 +40,6 @@ export const meta = {
|
|||
id: '033d0620-5bfe-4027-965d-980b0c85a3ea'
|
||||
},
|
||||
|
||||
isMyNote: {
|
||||
message: 'You can not react to your own notes.',
|
||||
code: 'IS_MY_NOTE',
|
||||
id: '7eeb9714-b047-43b5-b559-7b1b72810f53'
|
||||
},
|
||||
|
||||
alreadyReacted: {
|
||||
message: 'You are already reacting to that note.',
|
||||
code: 'ALREADY_REACTED',
|
||||
|
@ -60,7 +54,6 @@ export default define(meta, async (ps, user) => {
|
|||
throw e;
|
||||
});
|
||||
await createReaction(user, note, ps.reaction).catch(e => {
|
||||
if (e.id === '2d8e7297-1873-4c00-8404-792c68d7bef0') throw new ApiError(meta.errors.isMyNote);
|
||||
if (e.id === '51c42bb4-931a-456b-bff7-e5a8a70dd298') throw new ApiError(meta.errors.alreadyReacted);
|
||||
throw e;
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue