18 lines
349 B
Python
18 lines
349 B
Python
|
from flask import jsonify, Response as FlaskResponse
|
||
|
|
||
|
|
||
|
def bad_req(msg):
|
||
|
"""400 bad request status code"""
|
||
|
res = FlaskResponse()
|
||
|
res.status_code = 400
|
||
|
res.data = msg
|
||
|
return res
|
||
|
|
||
|
|
||
|
def not_found(msg):
|
||
|
"""404 not found request status code"""
|
||
|
res = FlaskResponse()
|
||
|
res.status_code = 404
|
||
|
res.data = msg
|
||
|
return res
|