Removed unused imports and code

This commit is contained in:
Peter Yefi 2023-01-16 16:08:02 -05:00
parent 31867370d8
commit ab4492aebb

View File

@ -4,30 +4,18 @@ SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2022 Project Author name guillermo.gutierrezmorote@concordia.ca Copyright © 2022 Project Author name guillermo.gutierrezmorote@concordia.ca
""" """
import json import json
from flask_apispec import use_kwargs, doc
from flask import Response, request, g from flask import Response, request, g
from flask_restful import Resource from flask_restful import Resource
from hub_api.helpers.session_helper import refresh_session from hub_api.helpers.session_helper import refresh_session
from marshmallow import fields, Schema
from hub_api.helpers.auth import role_required from hub_api.helpers.auth import role_required
from persistence.models import UserRoles from persistence.models import UserRoles
from hub_logger import logger from hub_logger import logger
from flasgger import swag_from
from imports.geometry_factory import GeometryFactory from imports.geometry_factory import GeometryFactory
from pathlib import Path from pathlib import Path
from imports.db_factory import DBFactory from imports.db_factory import DBFactory
import os import os
class AuthorizationHeader(Schema):
Authorization = fields.Str(required=True, description='Authorization token')
AppID = fields.Str(required=True, description='ID of app accessing API')
class CitySchema(Schema):
city_file = fields.Raw(type='file', required=True, description='City file')
class CityInfo(Resource): class CityInfo(Resource):
def __init__(self): def __init__(self):
pass pass
@ -94,8 +82,7 @@ class City(Resource):
def __init__(self): def __init__(self):
pass pass
#@role_required([UserRoles.Admin.value]) @role_required([UserRoles.Admin.value])
@swag_from("docs/openapi-specs.yml", methods=['POST'])
def post(self): def post(self):
allowed_ext = {'gml', '3dm', 'xml', 'obj', 'rhino'} allowed_ext = {'gml', '3dm', 'xml', 'obj', 'rhino'}
try: try: