full
This commit is contained in:
48
routes/application/account/index.js
Normal file
48
routes/application/account/index.js
Normal file
@@ -0,0 +1,48 @@
|
||||
const express = require('express')
|
||||
const auth = require('../../../middlewares/auth')
|
||||
const blockCheck = require('../../../middlewares/blockCheck')
|
||||
const {
|
||||
deactivateAccount,
|
||||
reactivateAccount,
|
||||
deleteAccount,
|
||||
getAccountStatus,
|
||||
updatePrivacySettings,
|
||||
resetAlgorithm,
|
||||
updateUserRegion,
|
||||
getProfileVisitors,
|
||||
pinPost,
|
||||
toggleArchivePost,
|
||||
getArchivedPosts,
|
||||
getAccountAnalytics
|
||||
} = require('../../../controllers/application/profile/accountController')
|
||||
const {
|
||||
putMyPublicKey,
|
||||
getPublicKeyByUserId,
|
||||
startDeviceLink,
|
||||
getDeviceLinkSession,
|
||||
approveDeviceLink,
|
||||
pollDeviceLink
|
||||
} = require('../../../controllers/application/account/e2eeController')
|
||||
|
||||
const router = express.Router()
|
||||
|
||||
router.get('/status', auth, blockCheck, getAccountStatus)
|
||||
router.get('/visitors', auth, blockCheck, getProfileVisitors)
|
||||
router.patch('/privacy', auth, blockCheck, updatePrivacySettings)
|
||||
router.post('/reset-algorithm', auth, blockCheck, resetAlgorithm)
|
||||
router.patch('/region', auth, blockCheck, updateUserRegion)
|
||||
router.post('/pin-post', auth, blockCheck, pinPost)
|
||||
router.post('/archive-post', auth, blockCheck, toggleArchivePost)
|
||||
router.get('/archived-posts', auth, blockCheck, getArchivedPosts)
|
||||
router.get('/analytics', auth, blockCheck, getAccountAnalytics)
|
||||
router.post('/deactivate', auth, blockCheck, deactivateAccount)
|
||||
router.post('/reactivate', auth, reactivateAccount)
|
||||
router.post('/delete', auth, blockCheck, deleteAccount)
|
||||
router.put('/e2ee/public-key', auth, blockCheck, putMyPublicKey)
|
||||
router.get('/e2ee/public-key/:userId', auth, blockCheck, getPublicKeyByUserId)
|
||||
router.post('/e2ee/device-link', auth, blockCheck, startDeviceLink)
|
||||
router.get('/e2ee/device-link/:linkId', auth, blockCheck, getDeviceLinkSession)
|
||||
router.post('/e2ee/device-link/:linkId/approve', auth, blockCheck, approveDeviceLink)
|
||||
router.get('/e2ee/device-link/:linkId/poll', auth, blockCheck, pollDeviceLink)
|
||||
|
||||
module.exports = router
|
||||
Reference in New Issue
Block a user