From ab4492aebbf99d46c215ba4a6bea6f366cf57926 Mon Sep 17 00:00:00 2001 From: Peter Yefi Date: Mon, 16 Jan 2023 16:08:02 -0500 Subject: [PATCH] Removed unused imports and code --- hub_api/city_info.py | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/hub_api/city_info.py b/hub_api/city_info.py index 37a86e5..8971cd3 100644 --- a/hub_api/city_info.py +++ b/hub_api/city_info.py @@ -4,30 +4,18 @@ SPDX - License - Identifier: LGPL - 3.0 - or -later Copyright © 2022 Project Author name guillermo.gutierrezmorote@concordia.ca """ import json -from flask_apispec import use_kwargs, doc from flask import Response, request, g from flask_restful import Resource from hub_api.helpers.session_helper import refresh_session -from marshmallow import fields, Schema from hub_api.helpers.auth import role_required from persistence.models import UserRoles from hub_logger import logger -from flasgger import swag_from from imports.geometry_factory import GeometryFactory from pathlib import Path from imports.db_factory import DBFactory 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): def __init__(self): pass @@ -94,8 +82,7 @@ class City(Resource): def __init__(self): pass - #@role_required([UserRoles.Admin.value]) - @swag_from("docs/openapi-specs.yml", methods=['POST']) + @role_required([UserRoles.Admin.value]) def post(self): allowed_ext = {'gml', '3dm', 'xml', 'obj', 'rhino'} try: