blu3-bird/Shopping-on-tuesday
Replace hard-coded route strings with constants in auth/routes.py
Open
#46 opened on Dec 10, 2025
documentationfrontendhelp wanted🐭good first issue🫎enhancement
Repository metrics
- Stars
- (5 stars)
- PR merge metrics
- (PR metrics pending)
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