mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 23:41:17 -05:00
Remove the view packages
This commit is contained in:
@@ -24,18 +24,16 @@ def create_app(config_name):
|
|||||||
db.init_app(application)
|
db.init_app(application)
|
||||||
ma.init_app(application)
|
ma.init_app(application)
|
||||||
init_app(application)
|
init_app(application)
|
||||||
|
|
||||||
logging.init_app(application)
|
logging.init_app(application)
|
||||||
|
|
||||||
from .service import service as service_blueprint
|
from app.service.rest import service as service_blueprint
|
||||||
from .user import user as user_blueprint
|
from app.user.rest import user as user_blueprint
|
||||||
from .template import template as template_blueprint
|
from app.template.rest import template as template_blueprint
|
||||||
|
from app.status.healthcheck import status as status_blueprint
|
||||||
application.register_blueprint(service_blueprint, url_prefix='/service')
|
application.register_blueprint(service_blueprint, url_prefix='/service')
|
||||||
application.register_blueprint(user_blueprint, url_prefix='/user')
|
application.register_blueprint(user_blueprint, url_prefix='/user')
|
||||||
application.register_blueprint(template_blueprint, url_prefix="/template")
|
application.register_blueprint(template_blueprint, url_prefix="/template")
|
||||||
|
application.register_blueprint(status_blueprint, url_prefix='/status')
|
||||||
from .status import status as status_blueprint
|
|
||||||
application.register_blueprint(status_blueprint)
|
|
||||||
|
|
||||||
return application
|
return application
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
from flask import Blueprint
|
|
||||||
|
|
||||||
service = Blueprint('service', __name__)
|
|
||||||
|
|
||||||
from app.service.views import rest
|
|
||||||
|
|||||||
@@ -14,10 +14,12 @@ from app.dao.tokens_dao import (save_model_token, get_model_tokens, get_unsigned
|
|||||||
from app.models import Token
|
from app.models import Token
|
||||||
from app.schemas import (
|
from app.schemas import (
|
||||||
services_schema, service_schema, template_schema)
|
services_schema, service_schema, template_schema)
|
||||||
from .. import service
|
|
||||||
|
from flask import Blueprint
|
||||||
|
service = Blueprint('service', __name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# TODO auth to be added.
|
|
||||||
@service.route('/', methods=['POST'])
|
@service.route('/', methods=['POST'])
|
||||||
def create_service():
|
def create_service():
|
||||||
# TODO what exceptions get passed from schema parsing?
|
# TODO what exceptions get passed from schema parsing?
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
from flask import Blueprint
|
|
||||||
|
|
||||||
status = Blueprint('status', __name__)
|
|
||||||
|
|
||||||
from app.status.views import healthcheck
|
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
from flask import jsonify
|
from flask import jsonify
|
||||||
|
|
||||||
from app.status import status
|
from flask import Blueprint
|
||||||
|
status = Blueprint('status', __name__)
|
||||||
|
|
||||||
|
|
||||||
@status.route('/_status')
|
@status.route('/_status')
|
||||||
def status():
|
def show_status():
|
||||||
return jsonify(
|
return jsonify(
|
||||||
status="ok",
|
status="ok",
|
||||||
), 200
|
), 200
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
from flask import Blueprint
|
|
||||||
|
|
||||||
template = Blueprint('template', __name__)
|
|
||||||
|
|
||||||
from app.template import rest
|
|
||||||
|
|||||||
@@ -1,16 +1,12 @@
|
|||||||
from flask import (jsonify, request)
|
from flask import Blueprint
|
||||||
|
from flask import (jsonify)
|
||||||
from sqlalchemy.exc import DataError
|
from sqlalchemy.exc import DataError
|
||||||
from sqlalchemy.orm.exc import NoResultFound
|
from sqlalchemy.orm.exc import NoResultFound
|
||||||
from app.dao.templates_dao import get_model_templates
|
|
||||||
from app.dao.services_dao import get_model_services
|
|
||||||
from app.schemas import (template_schema, templates_schema)
|
|
||||||
from app import db
|
|
||||||
|
|
||||||
from flask import (jsonify, request)
|
from app.dao.templates_dao import get_model_templates
|
||||||
from sqlalchemy.exc import DataError
|
from app.schemas import (template_schema, templates_schema)
|
||||||
from sqlalchemy.orm.exc import NoResultFound
|
|
||||||
from . import template
|
template = Blueprint('template', __name__)
|
||||||
from app import db
|
|
||||||
|
|
||||||
|
|
||||||
# I am going to keep these for admin like operations
|
# I am going to keep these for admin like operations
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
from flask import Blueprint
|
|
||||||
|
|
||||||
user = Blueprint('user', __name__)
|
|
||||||
|
|
||||||
from app.user.views import rest
|
|
||||||
|
|||||||
@@ -6,10 +6,13 @@ from app.dao.users_dao import (
|
|||||||
get_model_users, save_model_user, delete_model_user)
|
get_model_users, save_model_user, delete_model_user)
|
||||||
from app.schemas import (
|
from app.schemas import (
|
||||||
user_schema, users_schema, service_schema, services_schema)
|
user_schema, users_schema, service_schema, services_schema)
|
||||||
from .. import user
|
|
||||||
from app import db
|
from app import db
|
||||||
|
|
||||||
|
|
||||||
|
from flask import Blueprint
|
||||||
|
user = Blueprint('user', __name__)
|
||||||
|
|
||||||
|
|
||||||
# TODO auth to be added
|
# TODO auth to be added
|
||||||
@user.route('/', methods=['POST'])
|
@user.route('/', methods=['POST'])
|
||||||
def create_user():
|
def create_user():
|
||||||
Reference in New Issue
Block a user