blu3-bird/Shopping-on-tuesday
Replace hard-coded route strings with constants in auth/routes.py
Aberta
#46 aberto em 10 de dez. de 2025
documentationfrontendhelp wanted🐭good first issue🫎enhancement
Métricas do repositório
- Stars
- (5 estrelas)
- Métricas de merge de PR
- (Métricas PR pendentes)
Description
[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