feat(api): refactor API client usage across frontend components

- Replaced direct axios calls with a centralized apiClient in Register, Login, and Activate components for improved maintainability and consistency.
- Updated backend base URL logic to support different environments, enhancing flexibility in API interactions.
- Added console logging in the authController for better tracking of user registration flow.
This commit is contained in:
Torsten Schulz (local)
2026-02-04 12:02:14 +01:00
parent a86c05eb66
commit e333a54025
5 changed files with 12 additions and 8 deletions

View File

@@ -3,9 +3,12 @@ import { register, activateUser, login, logout } from '../services/authService.j
const registerUser = async (req, res, next) => {
try {
const { email, password } = req.body;
console.log('registerUser', email, password);
await register(email, password);
console.log('registerUser done');
// Aus Sicherheitsgründen KEINE Userdaten (Passwort-Hash, Aktivierungscode, ...) zurückgeben
res.status(201).json({ success: true });
console.log('registerUser response sent');
} catch (error) {
next(error);
}