refactor(ocp): moved printers to there own folder to keep everything clean
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import { db } from "../../../../database/dbclient.js";
|
import { db } from "../../../../../database/dbclient.js";
|
||||||
import { tryCatch } from "../../../globalUtils/tryCatch.js";
|
import { tryCatch } from "../../../../globalUtils/tryCatch.js";
|
||||||
import { printers } from "../../../../database/schema/printers.js";
|
import { printers } from "../../../../../database/schema/printers.js";
|
||||||
|
|
||||||
export const getPrinters = async () => {
|
export const getPrinters = async () => {
|
||||||
const currentTime = new Date(Date.now());
|
const currentTime = new Date(Date.now());
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
import { db } from "../../../../database/dbclient.js";
|
import { printers } from "../../../../../database/schema/printers.js";
|
||||||
import { tryCatch } from "../../../globalUtils/tryCatch.js";
|
|
||||||
import { printers } from "../../../../database/schema/printers.js";
|
|
||||||
import { settings } from "../../../../database/schema/settings.js";
|
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import { lstAuth } from "../../../index.js";
|
|
||||||
import { prodEndpointCreation } from "../../../globalUtils/createUrl.js";
|
|
||||||
import { createLog } from "../../logger/logger.js";
|
|
||||||
import { sql } from "drizzle-orm";
|
import { sql } from "drizzle-orm";
|
||||||
|
import { prodEndpointCreation } from "../../../../globalUtils/createUrl.js";
|
||||||
|
import { tryCatch } from "../../../../globalUtils/tryCatch.js";
|
||||||
|
import { lstAuth } from "../../../../index.js";
|
||||||
|
import { db } from "../../../../../database/dbclient.js";
|
||||||
|
import { createLog } from "../../../logger/logger.js";
|
||||||
|
|
||||||
export const updatePrinters = async () => {
|
export const updatePrinters = async () => {
|
||||||
const currentTime = new Date(Date.now());
|
const currentTime = new Date(Date.now());
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
import { createRoute, OpenAPIHono, z } from "@hono/zod-openapi";
|
import { createRoute, OpenAPIHono, z } from "@hono/zod-openapi";
|
||||||
import { responses } from "../../../../globalUtils/routeDefs/responses.js";
|
import { responses } from "../../../../globalUtils/routeDefs/responses.js";
|
||||||
import { tryCatch } from "../../../../globalUtils/tryCatch.js";
|
import { tryCatch } from "../../../../globalUtils/tryCatch.js";
|
||||||
import { getPrinters } from "../../controller/getPrinters.js";
|
import { getPrinters } from "../../controller/printers/getPrinters.js";
|
||||||
|
|
||||||
const app = new OpenAPIHono({ strict: false });
|
const app = new OpenAPIHono({ strict: false });
|
||||||
const CreateLog = z.object({
|
const CreateLog = z.object({
|
||||||
|
|||||||
@@ -2,8 +2,7 @@
|
|||||||
import { createRoute, OpenAPIHono, z } from "@hono/zod-openapi";
|
import { createRoute, OpenAPIHono, z } from "@hono/zod-openapi";
|
||||||
import { responses } from "../../../../globalUtils/routeDefs/responses.js";
|
import { responses } from "../../../../globalUtils/routeDefs/responses.js";
|
||||||
import { tryCatch } from "../../../../globalUtils/tryCatch.js";
|
import { tryCatch } from "../../../../globalUtils/tryCatch.js";
|
||||||
import { getPrinters } from "../../controller/getPrinters.js";
|
import { updatePrinters } from "../../controller/printers/updatePrinters.js";
|
||||||
import { updatePrinters } from "../../controller/updatePrinters.js";
|
|
||||||
|
|
||||||
const app = new OpenAPIHono({ strict: false });
|
const app = new OpenAPIHono({ strict: false });
|
||||||
const CreateLog = z.object({
|
const CreateLog = z.object({
|
||||||
|
|||||||
Reference in New Issue
Block a user