Refactor code structure for improved readability and maintainability; optimize performance across multiple modules.
All checks were successful
Deploy to production / deploy (push) Successful in 2m56s

This commit is contained in:
Torsten Schulz (local)
2026-07-21 09:08:15 +02:00
parent 75b52de282
commit 1ab9407e79
1400 changed files with 22278 additions and 485 deletions

12
backend/controllers/socialnetworkController.js Normal file → Executable file
View File

@@ -40,6 +40,8 @@ class SocialNetworkController {
this.removeFriend = this.removeFriend.bind(this);
this.acceptFriendship = this.acceptFriendship.bind(this);
this.getLoggedInFriends = this.getLoggedInFriends.bind(this);
this.blockUser = this.blockUser.bind(this);
this.unblockUser = this.unblockUser.bind(this);
}
async userSearch(req, res) {
@@ -54,6 +56,16 @@ class SocialNetworkController {
}
}
async blockUser(req, res) {
try { await this.socialNetworkService.blockUser(req.headers.userid, req.params.userId); res.status(204).send(); }
catch (error) { res.status(400).json({ error: error.message }); }
}
async unblockUser(req, res) {
try { await this.socialNetworkService.unblockUser(req.headers.userid, req.params.userId); res.status(204).send(); }
catch (error) { res.status(400).json({ error: error.message }); }
}
async profile(req, res) {
try {
const { userId } = req.params;