PART 1: Created and implemented enums throughout the codebase to replace hardcoded status strings, improving type safety and reducing the risk of typos.

This commit is contained in:
Beverly Nguyen
2025-07-04 16:37:04 -07:00
parent db20c888f2
commit b73b4ac73e
12 changed files with 132 additions and 45 deletions

View File

@@ -1,9 +1,10 @@
from app.notify_client import NotifyAdminAPIClient, _attach_current_user
from app.enums import ApiKeyType
# must match key types in notifications-api/app/models.py
KEY_TYPE_NORMAL = "normal"
KEY_TYPE_TEAM = "team"
KEY_TYPE_TEST = "test"
KEY_TYPE_NORMAL = ApiKeyType.NORMAL.value
KEY_TYPE_TEAM = ApiKeyType.TEAM.value
KEY_TYPE_TEST = ApiKeyType.TEST.value
class ApiKeyApiClient(NotifyAdminAPIClient):