mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-12-13 21:40:45 +01:00
Fix comments
This commit is contained in:
parent
49c2a9b372
commit
95dc76ca19
1 changed files with 0 additions and 3 deletions
|
@ -35,20 +35,17 @@ export const meta = {
|
|||
};
|
||||
|
||||
export default define(meta, async (ps, user) => {
|
||||
// Get favoritee
|
||||
const note = await getNote(ps.noteId).catch(e => {
|
||||
if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote);
|
||||
throw e;
|
||||
});
|
||||
|
||||
// if already favorited
|
||||
const exist = await PromoNotes.findOne(note.id);
|
||||
|
||||
if (exist != null) {
|
||||
throw new ApiError(meta.errors.alreadyPromoted);
|
||||
}
|
||||
|
||||
// Create favorite
|
||||
await PromoNotes.save({
|
||||
noteId: note.id,
|
||||
createdAt: new Date(),
|
||||
|
|
Loading…
Reference in a new issue