Bugs in settings fixed, profile added

This commit is contained in:
Torsten Schulz
2024-09-21 00:25:42 +02:00
parent c5a72d57d8
commit e494fe41db
65 changed files with 3121 additions and 7478 deletions

View File

@@ -1,6 +1,6 @@
import { Router } from 'express';
import { authenticate } from '../middleware/authMiddleware.js';
import { getOpenInterests, changeInterest, deleteInterest, changeTranslation, getOpenContacts } from '../controllers/adminController.js';
import { getOpenInterests, changeInterest, deleteInterest, changeTranslation, getOpenContacts, answerContact } from '../controllers/adminController.js';
const router = Router();
@@ -10,5 +10,7 @@ router.post('/interest/translation', authenticate, changeTranslation);
router.delete('/interest/:id', authenticate, deleteInterest);
router.get('/opencontacts', authenticate, getOpenContacts);
router.post('/contacts/answer', answerContact);
export default router;

View File

@@ -1,6 +1,7 @@
import { Router } from 'express';
import { filterSettings, updateSetting, getTypeParamValueId, getTypeParamValues, getTypeParamValue, getAccountSettings,
getPossibleInterests, getInterests, addInterest, addUserInterest, removeInterest } from '../controllers/settingsController.js';
getPossibleInterests, getInterests, addInterest, addUserInterest, removeInterest, getVisibilities, updateVisibility }
from '../controllers/settingsController.js';
import { authenticate } from '../middleware/authMiddleware.js';
const router = Router();
@@ -17,5 +18,7 @@ router.get('/getuserinterests', authenticate, getInterests);
router.post('/addinterest', authenticate, addInterest);
router.post('/setinterest', authenticate, addUserInterest);
router.get('/removeinterest/:id', authenticate, removeInterest);
router.get('/visibilities', authenticate, getVisibilities);
router.post('/update-visibility', authenticate, updateVisibility);
export default router;

View File

@@ -0,0 +1,11 @@
import express from 'express';
import { authenticate } from '../middleware/authMiddleware.js';
import SocialNetworkController from '../controllers/socialnetworkController.js';
const router = express.Router();
const socialNetworkController = new SocialNetworkController();
router.post('/usersearch', authenticate, socialNetworkController.userSearch);
router.get('/profile/:userId', authenticate, socialNetworkController.profile);
export default router;