blu3-bird/Shopping-on-tuesday

Replace hard-coded route strings with constants in auth/routes.py

オープン

#46 opened on 2025/12/10

 (0 件のコメント) (0 件のリアクション) (0 人の担当者)CSS (16 件のフォーク)auto 404
documentationfrontendhelp wanted🐭good first issue🫎enhancement

Repository metrics

Stars
 (5 個のスター)
PR merge metrics
 (PR metrics pending)

説明

[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

コントリビューターガイド