Skip to content

Commit

Permalink
feat: /offer/accept conforms to RESTful protocol. will return 200 wit…
Browse files Browse the repository at this point in the history
…h message if no offer
  • Loading branch information
wwills2 committed Aug 15, 2024
1 parent 42248fa commit d585902
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
6 changes: 1 addition & 5 deletions src/controllers/offer.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,20 +176,16 @@ 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',
success: true,
});
return;
}
*/

// replace with above
await assertActiveOfferFile();

const offerFileJson = await Meta.findOne({
where: { metaKey: 'activeOffer' },
Expand Down
1 change: 1 addition & 0 deletions src/controllers/organization.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
}
Expand Down

0 comments on commit d585902

Please sign in to comment.