This commit is contained in:
payacom
2026-08-31 20:45:41 +03:30
parent fa9f23c61d
commit 3f416a7a60
367 changed files with 621895 additions and 6443 deletions

View File

@@ -1,23 +1,43 @@
const express = require('express')
const { getUsers, getSingleUser, blockUser, unblockUser, getComments,createLicense, getAllLicenses,updateLicenseConfirmation, getLicenseByUserId, inviteEmployer, getUserContactInfo, getPostsWeb, getSingleUserWeb, createUserComment, recordExploreInteraction } = require('../../../controllers/application/users/getUserController')
const { getUsers, getSingleUser, blockUser, unblockUser, getComments,createLicense, getAllLicenses,updateLicenseConfirmation, getLicenseByUserId, inviteEmployer, getUserContactInfo, getPostsWeb, getSingleUserWeb, createUserComment, toggleCommentLike, recordExploreInteraction, getPublicProfilesForSeo, getTopHashtags } = require('../../../controllers/application/users/getUserController')
const { getFollowStats, getFollowers, getFollowing, getBlockedUsers } = require('../../../controllers/application/users/followController')
const { getNearbyUsers } = require('../../../controllers/application/users/nearbyUsersController')
const {
searchPartners,
getMyPartnerAlert,
createPartnerAlert,
deletePartnerAlert
} = require('../../../controllers/application/users/partnerSearchController')
const blockCheck = require('../../../middlewares/blockCheck')
const isRegister = require('../../../middlewares/isRegister')
const auth = require('../../../middlewares/auth')
const router = express.Router()
router.get('/follow/stats', auth, getFollowStats)
router.get('/follow/followers', auth, getFollowers)
router.get('/follow/following', auth, getFollowing)
router.get('/blocked/list', [auth, blockCheck], getBlockedUsers)
router.get('/nearby', [auth, blockCheck], getNearbyUsers)
router.get('/partner-search', [auth, blockCheck], searchPartners)
router.get('/partner-search/alerts', [auth, blockCheck], getMyPartnerAlert)
router.post('/partner-search/alerts', [auth, blockCheck], createPartnerAlert)
router.delete('/partner-search/alerts/:id', [auth, blockCheck], deletePartnerAlert)
router.get('/', [auth], getUsers)
router.get('/web', getPostsWeb)
router.get('/explore/top-hashtags', getTopHashtags)
router.get('/seo/public-profiles', getPublicProfilesForSeo)
router.get('/get', [auth], getSingleUser)
router.get('/get/web', getSingleUserWeb)
router.post('/block', [auth], [isRegister], [blockCheck], blockUser)
router.post('/unblock', [auth], [isRegister], [blockCheck], unblockUser)
router.get('/comments', [auth], getComments)
router.post('/comments', [auth], [isRegister], [blockCheck], createUserComment)
router.post('/comments/like', [auth], [isRegister], [blockCheck], toggleCommentLike)
router.post('/explore/interaction', [auth], recordExploreInteraction)
router.get('/invite-employer', [auth], [isRegister], [blockCheck], inviteEmployer)
router.get('/contact-info', [auth], getUserContactInfo)
router.get('/License', getAllLicenses)
router.get('/License/:userId', getLicenseByUserId)
router.post('/License', createLicense)
router.put('/License/:userId', updateLicenseConfirmation)
router.get('/License', [auth], getAllLicenses)
router.get('/License/:userId', [auth, blockCheck], getLicenseByUserId)
router.post('/License', [auth, blockCheck], createLicense)
router.put('/License/:userId', [auth], updateLicenseConfirmation)
module.exports = router