api_v1.4/hub_api/city_commands.py

62 lines
1.3 KiB
Python
Raw Normal View History

"""
HeatPump Service
SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2023 Project Author Koa Wells kekoa.wells@concordia.ca
"""
import json
from flask import Response, request
from flask_restful import Resource
from imports.user_factory import UserFactory
from exports.user_factory import UserFactory as ExUserFactory
import os
from hub_logger import logger
from hub_api.helpers.auth import generate_auth_token, role_required
from persistence.models import UserRoles
#Admin commands
class SaveCity(Resource):
def __init__(self):
print()
@role_required([UserRoles.Admin.value])
def put(self):
class UpdateCity(Resource):
def __init__(self):
print()
@role_required([UserRoles.Admin.value])
def put(self):
class UpdateCity(Resource):
class DeleteCity(Resource):
def __init__(self):
print()
@role_required([UserRoles.Admin.value])
def delete(self):
#Standard user commands
class ListCities(Resource):
def __init__(self):
print()
@role_required([UserRoles.Admin.value])
def put(self):
class SearchCity(Resource):
def __init__(self):
print()
def get(self):
class UpdateCity(Resource):
def __init__(self):
print()
def get(self):