blu3-bird/Shopping-on-tuesday
Replace hard-coded route strings with constants in auth/routes.py
Aperta
#46 aperta il 10 dic 2025
documentationfrontendhelp wanted🐭good first issue🫎enhancement
Metriche repository
- Star
- (5 stelle)
- Metriche merge PR
- (Metriche PR in attesa)
Descrizione
[Refactor] Replace hard-coded route strings with constants in auth/routes.py
Description
The authentication routes file (app/auth/routes.py) contains hard-coded route name strings that should be replaced with constants for better maintainability.
Current Issues
File: app/auth/routes.py
Hard-coded strings found:
'admin.dashboard'(appears 2 times in login function)'main.index'(appears 1 time in logout function)'auth.login'(appears 1 time in login function)
Problems
- Typos only caught at runtime
- Difficult to refactor if route names change
Reference
- DEFAULT_AFTER_LOGIN = 'admin.dashboard'
- DEFAULT_AFTER_LOGOUT = 'main.index'
Labels: enhancement, refactoring, code-quality
Scope: app/auth/routes.py