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

6
backend/controllers/settingsController.js Normal file → Executable file
View File

@@ -68,6 +68,9 @@ class SettingsController {
async getAccountSettings(req, res) {
try {
const { userId } = req.body;
if (userId !== req.headers.userid) {
return res.status(403).json({ error: 'Access denied' });
}
const accountSettings = await settingsService.getAccountSettings(userId);
res.status(200).json(accountSettings);
} catch (error) {
@@ -86,6 +89,9 @@ class SettingsController {
return res.status(400).json({ error: error.details[0].message });
}
try {
if (value.userId !== req.headers.userid) {
return res.status(403).json({ error: 'Access denied' });
}
await settingsService.setAccountSettings(value);
res.status(200).json({ message: 'Account settings updated successfully' });
} catch (error) {