chore: remove sample comments
TS Lint / ESLint (push) Successful in 7m49s
Python Lint CI / ruff (push) Successful in 8m2s
Python Lint CI / ty (push) Successful in 8m1s
Python Lint CI / ruff-format-check (push) Successful in 8m1s
TS Lint / Oxlint (push) Successful in 4m11s
TS Lint / TypeScript (push) Successful in 4m6s

This commit is contained in:
2026-07-06 00:25:00 +02:00
parent 73067f51ce
commit 2e5eb86848
6 changed files with 9 additions and 63 deletions
+1 -11
View File
@@ -8,7 +8,7 @@ import gunicorn.app.base
import tortoise
from app import PKG_NAME
from app.models import Comment, Task
from app.models import Task
if typing.TYPE_CHECKING:
from app.params import Parameters
@@ -41,16 +41,6 @@ class Server(gunicorn.app.base.BaseApplication):
def index() -> str:
return flask.render_template("index.html")
@self.app.route("/api/comments", methods=["GET"])
async def get_comments() -> list:
return await Comment.all().order_by("created_at").values()
@self.app.route("/api/comments", methods=["POST"])
async def post_comment() -> tuple[str, int]:
data = flask.request.get_json()
await Comment.create(content=data["content"])
return ("", 204)
@self.app.route("/api/lists/<list_name>/tasks", methods=["GET"])
async def get_tasks(list_name: str) -> list:
return await Task.filter(list_name=list_name).values()