mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
21 lines
504 B
Python
21 lines
504 B
Python
import logging
|
|
from app.classes.web.base_api_handler import BaseApiHandler
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
|
|
class ApiServersIndexHandler(BaseApiHandler):
|
|
def get(self):
|
|
auth_data = self.authenticate_user()
|
|
if not auth_data:
|
|
return
|
|
|
|
# TODO: limit some columns for specific permissions
|
|
|
|
self.finish_json(200, {"status": "ok", "data": auth_data[0]})
|
|
|
|
def post(self):
|
|
# TODO: create server
|
|
self.set_status(404)
|
|
self.finish()
|