mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 10:21:14 -05:00
Getting NotificationStatus implemented everywhere.
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
from app.enums import TemplateType
|
||||
from app.models import NOTIFICATION_STATUS_TYPES
|
||||
from app.enums import TemplateType, NotificationStatus
|
||||
from app.schema_validation.definitions import personalisation, uuid
|
||||
|
||||
template = {
|
||||
@@ -81,7 +80,7 @@ get_notifications_request = {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"reference": {"type": "string"},
|
||||
"status": {"type": "array", "items": {"enum": NOTIFICATION_STATUS_TYPES}},
|
||||
"status": {"type": "array", "items": {"enum": [e.value for e in NotificationStatus]}},
|
||||
"template_type": {
|
||||
"type": "array",
|
||||
"items": {"enum": [e.value for e in TemplateType]},
|
||||
|
||||
@@ -10,8 +10,8 @@ from app import api_user, authenticated_service, document_download_client, encry
|
||||
from app.celery.tasks import save_api_email, save_api_sms
|
||||
from app.clients.document_download import DocumentDownloadError
|
||||
from app.config import QueueNames
|
||||
from app.enums import NotificationType
|
||||
from app.models import KEY_TYPE_NORMAL, NOTIFICATION_CREATED, PRIORITY, Notification
|
||||
from app.enums import NotificationType, NotificationStatus
|
||||
from app.models import KEY_TYPE_NORMAL, PRIORITY, Notification
|
||||
from app.notifications.process_notifications import (
|
||||
persist_notification,
|
||||
send_notification_to_queue_detached,
|
||||
@@ -219,7 +219,7 @@ def save_email_or_sms_to_queue(
|
||||
"client_reference": form.get("reference", None),
|
||||
"reply_to_text": reply_to_text,
|
||||
"document_download_count": document_download_count,
|
||||
"status": NOTIFICATION_CREATED,
|
||||
"status": NotificationStatus.CREATED,
|
||||
"created_at": datetime.utcnow().strftime(DATETIME_FORMAT),
|
||||
}
|
||||
encrypted = encryption.encrypt(data)
|
||||
|
||||
Reference in New Issue
Block a user