Add full project files
This commit is contained in:
18
routes/application/offers/index.js
Normal file
18
routes/application/offers/index.js
Normal file
@@ -0,0 +1,18 @@
|
||||
const express = require('express')
|
||||
const { getUserOffers, getOfferTypes, handleSuccessfulOfferPayment, handleFailedOfferPayment, updateOfferStatus, createOfferComment } = require('../../../controllers/application/offer/offerController')
|
||||
const { initiateOfferPaymentWeb, handleOfferPaymentCallback } = require('../../../controllers/application/payment/paymentControllerWeb')
|
||||
const blockCheck = require('../../../middlewares/blockCheck')
|
||||
const isRegister = require('../../../middlewares/isRegister')
|
||||
const auth = require('./../../../middlewares/auth')
|
||||
|
||||
const router = express.Router()
|
||||
router.get('/', getUserOffers)
|
||||
router.get('/types', [auth], getOfferTypes)
|
||||
router.post('/update-status', [auth], updateOfferStatus)
|
||||
router.post('/payment-success', [auth], handleSuccessfulOfferPayment)
|
||||
router.post('/payment-failed', [auth], handleFailedOfferPayment)
|
||||
router.post('/comment', [auth], createOfferComment)
|
||||
router.post('/initiate-payment-web', [auth], [blockCheck], initiateOfferPaymentWeb)
|
||||
router.get('/payment-web', handleOfferPaymentCallback)
|
||||
|
||||
module.exports = router
|
||||
Reference in New Issue
Block a user