KeyType implemented.

Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
This commit is contained in:
Cliff Hill
2024-01-18 10:28:50 -05:00
parent db3761609b
commit 7416de2a28
20 changed files with 90 additions and 109 deletions

View File

@@ -14,9 +14,9 @@ from app.dao.invited_user_dao import (
save_invited_user,
)
from app.dao.templates_dao import dao_get_template_by_id
from app.enums import NotificationType
from app.enums import InvitedUserStatus, NotificationType, KeyType
from app.errors import InvalidRequest, register_errors
from app.models import INVITE_PENDING, KEY_TYPE_NORMAL, Service
from app.models import Service
from app.notifications.process_notifications import (
persist_notification,
send_notification_to_queue,
@@ -47,7 +47,7 @@ def _create_service_invite(invited_user, invite_link_host):
},
notification_type=NotificationType.EMAIL,
api_key_id=None,
key_type=KEY_TYPE_NORMAL,
key_type=KeyType.NORMAL,
reply_to_text=invited_user.from_user.email_address,
)
@@ -116,7 +116,7 @@ def resend_service_invite(service_id, invited_user_id):
)
fetched.created_at = datetime.utcnow()
fetched.status = INVITE_PENDING
fetched.status = InvitedUserStatus.PENDING
current_data = {k: v for k, v in invited_user_schema.dump(fetched).items()}
update_dict = invited_user_schema.load(current_data)