fix
This commit is contained in:
parent
904585868a
commit
332061d5d0
|
|
@ -10,7 +10,7 @@ export const _ = {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const result = await execQuery(body, g.db);
|
const result = await execQuery(body, g.db);
|
||||||
res.send(result);
|
return result;
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
console.log("_dbs error", body, e.message);
|
console.log("_dbs error", body, e.message);
|
||||||
res.sendStatus(500);
|
res.sendStatus(500);
|
||||||
|
|
|
||||||
|
|
@ -109,6 +109,7 @@ export const _ = {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await $({ cwd: dir("app/db") })`bun install`;
|
await $({ cwd: dir("app/db") })`bun install`;
|
||||||
|
await $({})`cp -f .env app/db`;
|
||||||
await $({ cwd: dir("app/db") })`bun prisma db pull --force`;
|
await $({ cwd: dir("app/db") })`bun prisma db pull --force`;
|
||||||
await $({ cwd: dir("app/db") })`bun prisma generate`;
|
await $({ cwd: dir("app/db") })`bun prisma generate`;
|
||||||
await Bun.write(
|
await Bun.write(
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@ if (process.env.DATABASE_URL) {
|
||||||
if (!(await existsAsync(dir("node_modules/.prisma")))) {
|
if (!(await existsAsync(dir("node_modules/.prisma")))) {
|
||||||
try {
|
try {
|
||||||
await $({ cwd: dir(`app/db`) })`bun install`;
|
await $({ cwd: dir(`app/db`) })`bun install`;
|
||||||
|
await $({ })`cp -f .env app/db`;
|
||||||
await $({ cwd: dir(`app/db`) })`bun prisma db pull --force`;
|
await $({ cwd: dir(`app/db`) })`bun prisma db pull --force`;
|
||||||
await $({ cwd: dir(`app/db`) })`bun prisma generate`;
|
await $({ cwd: dir(`app/db`) })`bun prisma generate`;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,7 @@ export const createResponse = (
|
||||||
|
|
||||||
let content: any = typeof body === "string" ? body : JSON.stringify(body);
|
let content: any = typeof body === "string" ? body : JSON.stringify(body);
|
||||||
const headers = { ...(opt?.headers || {}) } as Record<string, string>;
|
const headers = { ...(opt?.headers || {}) } as Record<string, string>;
|
||||||
|
|
||||||
if (opt?.cache_accept) {
|
if (opt?.cache_accept) {
|
||||||
let cached = false;
|
let cached = false;
|
||||||
if (
|
if (
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue