mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-04 05:31:44 -04:00
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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user