__init__.py 1.4 KB
# coding=utf-8
#author:        4N
#createtime:    2021/9/14
#email:         nheweijun@sina.com


from flasgger import swag_from
from flask import Blueprint
from app.util import BlueprintApi
from . import upload_oview,tile_service_register,tile_service_edit,tile_service_reload
from app.decorators.token_decorator import token_decorator
from ..util.ServiceType import ServiceType

class DataManager(BlueprintApi):

    bp = Blueprint("TileService", __name__, url_prefix="/API/Service/TileService")

    service_type = [ServiceType.tile_service.value]


    @staticmethod
    @bp.route('/Register', methods=['POST'])
    @swag_from(tile_service_register.Api.api_doc)
    @token_decorator("profile")
    def api_wmts_register():
        """
        注册TileService
        """
        return tile_service_register.Api().result

    @staticmethod
    @bp.route('/Edit', methods=['POST'])
    @swag_from(tile_service_edit.Api.api_doc)
    @token_decorator("profile")
    def api_wmts_edit():
        """
        修改TileService
        """
        return tile_service_edit.Api().result

    @staticmethod
    @bp.route('/Reload', methods=['POST','GET'])
    @swag_from(tile_service_reload.Api.api_doc)
    def api_tile_service_reload():
        """
        TileService Reload
        """
        return tile_service_reload.Api().result