refactor(migration progress): moved to start looking at the go backedn
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import {OpenAPIHono} from "@hono/zod-openapi";
|
||||
import { OpenAPIHono } from "@hono/zod-openapi";
|
||||
|
||||
// routes
|
||||
import clearLog from "./routes/clearLog.js";
|
||||
import {db} from "../../../database/dbclient.js";
|
||||
import {settings} from "../../../database/schema/settings.js";
|
||||
import {logCleanup} from "./controller/logCleanup.js";
|
||||
import { db } from "../../../database/dbclient.js";
|
||||
import { settings } from "../../../database/schema/settings.js";
|
||||
import { logCleanup } from "./controller/logCleanup.js";
|
||||
import createNewLog from "./routes/createLog.js";
|
||||
import getLogs from "./routes/getLogs.js";
|
||||
import stream from "./routes/streamLogs.js";
|
||||
@@ -12,14 +12,17 @@ import stream from "./routes/streamLogs.js";
|
||||
const app = new OpenAPIHono();
|
||||
|
||||
const routes = [clearLog, createNewLog, getLogs, stream] as const;
|
||||
const setting = await db.select().from(settings);
|
||||
//const setting = await db.select().from(settings);
|
||||
|
||||
const appRoutes = routes.forEach((route) => {
|
||||
app.route("/logger", route);
|
||||
});
|
||||
|
||||
app.all("/logger/*", (c) => {
|
||||
return c.json({success: false, message: "You have encounters a log route that dose not exist."});
|
||||
return c.json({
|
||||
success: false,
|
||||
message: "You have encounters a log route that dose not exist.",
|
||||
});
|
||||
});
|
||||
|
||||
// run the clean up job ones on server restart/crash/update and then once a date
|
||||
|
||||
Reference in New Issue
Block a user