Skip to content

Commit

Permalink
fix(request): approve request when retrying request (#3234)
Browse files Browse the repository at this point in the history
chore(request): clarify comment
  • Loading branch information
danshilm committed Jan 12, 2023
1 parent 7b6db50 commit b515701
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions server/routes/request.ts
Expand Up @@ -492,8 +492,10 @@ requestRoutes.post<{
relations: { requestedBy: true, modifiedBy: true },
});

await request.updateParentStatus();
await request.sendMedia();
// this also triggers updating the parent media's status & sending to *arr
request.status = MediaRequestStatus.APPROVED;
await requestRepository.save(request);

return res.status(200).json(request);
} catch (e) {
logger.error('Error processing request retry', {
Expand Down

0 comments on commit b515701

Please sign in to comment.