added blueprint for flask application setup common to all selene api's
parent
21ae4511b9
commit
f5fb8b6dfe
|
@ -1,3 +1,4 @@
|
|||
from .base_endpoint import APIError, SeleneEndpoint
|
||||
from .base_config import get_base_config
|
||||
from .blueprint import selene_api
|
||||
from .response import SeleneResponse
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
from http import HTTPStatus
|
||||
|
||||
from flask import Blueprint
|
||||
from schematics.exceptions import DataError
|
||||
|
||||
selene_api = Blueprint('selene_api', __name__)
|
||||
|
||||
|
||||
@selene_api.app_errorhandler(DataError)
|
||||
def handle_data_error(error):
|
||||
return str(error.messages), HTTPStatus.BAD_REQUEST
|
Loading…
Reference in New Issue