From d585902cf79f0780bccd0b46159ae7b427b9b5e6 Mon Sep 17 00:00:00 2001 From: William Wills Date: Thu, 15 Aug 2024 16:15:33 -0400 Subject: [PATCH] feat: /offer/accept conforms to RESTful protocol. will return 200 with message if no offer --- src/controllers/offer.controller.js | 6 +----- src/controllers/organization.controller.js | 1 + 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/controllers/offer.controller.js b/src/controllers/offer.controller.js index 0c44c356..424c14b9 100644 --- a/src/controllers/offer.controller.js +++ b/src/controllers/offer.controller.js @@ -176,9 +176,9 @@ export const cancelImportedOfferFile = async (req, res) => { export const getCurrentOfferInfo = async (req, res) => { try { - /* fix for when old cadt-ui is no longer supported try { await assertActiveOfferFile(); + // eslint-disable-next-line no-unused-vars } catch (error) { res.status(200).json({ message: 'No offer to accept', @@ -186,10 +186,6 @@ export const getCurrentOfferInfo = async (req, res) => { }); return; } - */ - - // replace with above - await assertActiveOfferFile(); const offerFileJson = await Meta.findOne({ where: { metaKey: 'activeOffer' }, diff --git a/src/controllers/organization.controller.js b/src/controllers/organization.controller.js index b7c16486..d560afde 100644 --- a/src/controllers/organization.controller.js +++ b/src/controllers/organization.controller.js @@ -465,6 +465,7 @@ export const removeMirror = async (req, res) => { } catch (error) { res.status(400).json({ message: 'Error removing mirror for organization', + error: error.message, success: false, }); }