mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 14:09:20 -04:00
Refactor into model
It’s generally an antipattern for the view layer code to be calling the API client directly.
This commit is contained in:
@@ -360,6 +360,11 @@ class User(JSONModel, UserMixin):
|
||||
for credential in self.webauthn_credentials
|
||||
]
|
||||
|
||||
def create_webauthn_credential(self, credential):
|
||||
user_api_client.create_webauthn_credential_for_user(
|
||||
self.id, credential
|
||||
)
|
||||
|
||||
def serialize(self):
|
||||
dct = {
|
||||
"id": self.id,
|
||||
|
||||
Reference in New Issue
Block a user