crafty-4/app/classes/web/routes/api/index_handler.py
luukas bf59e2de6c Add and fix API v2 and db
* Add basic role routes
* Add API v2 404 handler
* Add API v2 home handler pointing to the wiki
* Add tons more todos
* Add get_*_columns and get_*_column functions for many db models
* Modify and add tons of model and controller functions
2022-05-08 00:07:55 +03:00

18 lines
509 B
Python

from app.classes.web.base_api_handler import BaseApiHandler
WIKI_API_LINK = "https://wiki.craftycontrol.com/en/4/docs/API V2"
class ApiIndexHandler(BaseApiHandler):
def get(self):
self.finish_json(
200,
{
"status": "ok",
"data": {
"version": self.controller.helper.get_version_string(),
"message": f"Please see the API documentation at {WIKI_API_LINK}",
},
},
)