Island: Add returns to the post and get credential resources

This commit is contained in:
vakarisz 2022-07-11 12:24:28 +03:00 committed by Mike Salvatore
parent 872d062649
commit c5ba5d444d
2 changed files with 4 additions and 0 deletions

View File

@ -21,6 +21,8 @@ class ConfiguredPropagationCredentials(AbstractResource):
def post(self): def post(self):
credentials = Credentials.from_mapping(request.json) credentials = Credentials.from_mapping(request.json)
self._credentials_repository.save_configured_credentials(credentials) self._credentials_repository.save_configured_credentials(credentials)
return {}, 204
def delete(self): def delete(self):
self._credentials_repository.remove_configured_credentials() self._credentials_repository.remove_configured_credentials()
return {}, 204

View File

@ -21,6 +21,8 @@ class StolenPropagationCredentials(AbstractResource):
def post(self): def post(self):
credentials = Credentials.from_mapping(request.json) credentials = Credentials.from_mapping(request.json)
self._credentials_repository.save_stolen_credentials(credentials) self._credentials_repository.save_stolen_credentials(credentials)
return {}, 204
def delete(self): def delete(self):
self._credentials_repository.remove_stolen_credentials() self._credentials_repository.remove_stolen_credentials()
return {}, 204