return the actual key

pull/20/head
db0 2023-09-05 11:32:36 +02:00
parent 8a70713707
commit fbe3b6c659
2 changed files with 2 additions and 2 deletions

View File

@ -44,7 +44,7 @@ class Models:
self.input_censures_modify = api.model('ModifyCensure', { self.input_censures_modify = api.model('ModifyCensure', {
'reason': fields.String(required=False, description="The reason for this censure. No profanity or hate speech allowed!", example="csam"), 'reason': fields.String(required=False, description="The reason for this censure. No profanity or hate speech allowed!", example="csam"),
}) })
self.response_model_api_key = api.model('SimpleResponse', { self.response_model_api_key_reset = api.model('ApiKeyReset', {
"message": fields.String(default='OK',required=True, description="The result of this operation."), "message": fields.String(default='OK',required=True, description="The result of this operation."),
"new_key": fields.String(default=None,required=False, description="The new API key"), "new_key": fields.String(default=None,required=False, description="The new API key"),
}) })

View File

@ -109,7 +109,7 @@ class WhitelistDomain(Resource):
@api.expect(patch_parser) @api.expect(patch_parser)
@api.marshal_with(models.response_model_simple_response, code=200, description='Instances', skip_none=True) @api.marshal_with(models.response_model_api_key_reset, code=200, description='Instances', skip_none=True)
@api.response(401, 'Invalid API Key', models.response_model_error) @api.response(401, 'Invalid API Key', models.response_model_error)
@api.response(403, 'Instance Not Registered', models.response_model_error) @api.response(403, 'Instance Not Registered', models.response_model_error)
def patch(self, domain): def patch(self, domain):