feat: improving infrastructure
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { Client } from "https://deno.land/x/mysql/mod.ts";
|
||||
import config from "@/config.json" assert { type: "json" };
|
||||
import config from "./config.json" assert { type: "json" };
|
||||
import {Maybe} from "./Maybe.ts";
|
||||
|
||||
export type WithoutId<T> = Omit<T, "id">;
|
||||
export interface StoccaTreDbConn {
|
||||
@@ -19,7 +20,6 @@ export default async function createNewDbConnection(): Promise<StoccaTreDbConn>
|
||||
const result = await mysqlClient.query(query);
|
||||
return {
|
||||
just: result as T,
|
||||
error: null,
|
||||
};
|
||||
} catch (e: unknown) {
|
||||
if (e && typeof (e as { message?: any }).message === "string") {
|
||||
@@ -29,7 +29,6 @@ export default async function createNewDbConnection(): Promise<StoccaTreDbConn>
|
||||
}
|
||||
}
|
||||
return {
|
||||
just: null,
|
||||
error: {
|
||||
message: errMessage
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user