mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
bf59e2de6c
* 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
18 lines
509 B
Python
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}",
|
|
},
|
|
},
|
|
)
|