Skip to content

Commit

Permalink
fix creat adpool (#407)
Browse files Browse the repository at this point in the history
  • Loading branch information
hichri-louay authored Jan 30, 2024
2 parents 3628896 + e85759d commit 7ca3b9c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
20 changes: 20 additions & 0 deletions controllers/campaign.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,26 @@ exports.campaigns = async (req, res) => {
}
}

exports.campaignDetailsDraft = async (req, res) => {
try {
var _id = req.params.id
var campaign = await Campaigns.findOne({ _id }).lean()
return responseHandler.makeResponseData(
res,
200,
'success',
campaign
)
} catch (err) {
return responseHandler.makeResponseError(
res,
500,
err.message ? err.message : err.error
)
}

}

exports.campaignDetails = async (req, res) => {
try {
var _id = req.params.id
Expand Down
2 changes: 2 additions & 0 deletions routes/campaign.routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const {
bttApproval,
bttAllow,
campaignDetails,
campaignDetailsDraft,
campaigns,
launchCampaign,
launchCampaignExt,
Expand Down Expand Up @@ -546,6 +547,7 @@ router.post('/ipfsExternal/:id', idCheckValidation,campaignsPictureUpload ,uploa
* description: error:"error"
*/
router.get('/details/:id', idCheckValidation,campaignDetails)
router.get('/detailsdraft/:id', idCheckValidation,campaignDetailsDraft)

/**
* @swagger
Expand Down

0 comments on commit 7ca3b9c

Please sign in to comment.