mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-23 07:46:06 -04:00
Updates from review comments:
Update api_key relationship. Check that id in dict exists before deleting it
This commit is contained in:
@@ -18,7 +18,7 @@ class UserSchema(ma.ModelSchema):
|
||||
class ServiceSchema(ma.ModelSchema):
|
||||
class Meta:
|
||||
model = models.Service
|
||||
exclude = ("updated_at", "created_at", "api_key", "templates", "jobs")
|
||||
exclude = ("updated_at", "created_at", "api_keys", "templates", "jobs")
|
||||
|
||||
|
||||
class TemplateSchema(ma.ModelSchema):
|
||||
@@ -30,7 +30,7 @@ class TemplateSchema(ma.ModelSchema):
|
||||
class ApiKeySchema(ma.ModelSchema):
|
||||
class Meta:
|
||||
model = models.ApiKey
|
||||
exclude = ["service"]
|
||||
exclude = ("service", "secret", "expiry_date")
|
||||
|
||||
|
||||
class JobSchema(ma.ModelSchema):
|
||||
|
||||
Reference in New Issue
Block a user