Skip to content

Commit

Permalink
fix creat adpool
Browse files Browse the repository at this point in the history
  • Loading branch information
waelhanfi04 committed Jan 30, 2024
1 parent 3628896 commit e85759d
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)

Check failure

Code scanning / CodeQL

Missing rate limiting High

This route handler performs
a database access
, but is not rate-limited.

/**
* @swagger
Expand Down

0 comments on commit e85759d

Please sign in to comment.