Merge pull request 'Removed unused imports and code' (#3) from api-v2 into main
Reviewed-on: https://nextgenerations-cities.encs.concordia.ca/gitea/p_yefi/gamification_service_v2/pulls/3
This commit is contained in:
commit
cb187ee6fb
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue
Block a user