20 lines
381 B
Python
20 lines
381 B
Python
from flask import jsonify
|
|
|
|
|
|
def not_found_json_response(**kwargs):
|
|
response = jsonify({
|
|
"message": "Not Found",
|
|
**kwargs
|
|
})
|
|
response.status_code = 404
|
|
return response
|
|
|
|
|
|
def error_json_response(message="Error", **kwargs):
|
|
response = jsonify({
|
|
"message": message,
|
|
**kwargs
|
|
})
|
|
response.status_code = 403
|
|
return response
|