added response utils
This commit is contained in:
parent
7edd66ff70
commit
e1b6f49686
1 changed files with 15 additions and 0 deletions
15
SE_API/Respones_Utils.py
Normal file
15
SE_API/Respones_Utils.py
Normal file
|
@ -0,0 +1,15 @@
|
|||
__author__ = 'Aran'
|
||||
|
||||
from flask import Response
|
||||
import json
|
||||
|
||||
def bad_request():
|
||||
return Response(response=json.dumps({'message': 'Bad Request'}),
|
||||
status=400,
|
||||
mimetype="application/json")
|
||||
|
||||
|
||||
def forbidden(message={'message': 'Forbidden'}):
|
||||
return Response(response=json.dumps(message),
|
||||
status=403,
|
||||
mimetype="application/json")
|
Loading…
Reference in a new issue