add new routes: /api/tag/rows

This commit is contained in:
2023-09-04 16:01:58 +08:00
parent 75c2bf1c95
commit 7e78caab3a
3 changed files with 38 additions and 20 deletions

10
routes/api/tag/rows.ts Normal file
View File

@@ -0,0 +1,10 @@
import { Handlers } from "$fresh/server.ts";
import { get_task_manager } from "../../../server.ts";
import { return_data } from "../../../server/utils.ts";
export const handler: Handlers = {
GET(_req, _ctx) {
const m = get_task_manager();
return return_data(m.db.get_tag_rows());
},
};