return the actual key
parent
8a70713707
commit
fbe3b6c659
|
@ -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"),
|
||||||
})
|
})
|
||||||
|
|
|
@ -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):
|
||||||
|
|
Loading…
Reference in New Issue