Skip to content

Commit

Permalink
fix: fix template url
Browse files Browse the repository at this point in the history
  • Loading branch information
nichenqin committed Dec 5, 2024
1 parent 8d58d71 commit ad19393
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/env/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,12 @@ const dbEnv = createEnv({
export const env = createEnv({
shared: {
LOG_LEVEL: z.enum(["info", "debug", "error"]).default("info"),
UNDB_BASE_URL: z.string().optional().default("http://localhost:3721"),
},
clientPrefix: "UNDB_PUBLIC_",
client: {},
server: {
NODE_ENV: z.enum(["development", "production", "test"]).default("development"),
UNDB_BASE_URL: z.string().optional().default("http://localhost:3721"),
UNDB_COOKIE_DOMAIN: z.string().optional(),
},
runtimeEnv: import.meta.env,
Expand Down
5 changes: 3 additions & 2 deletions packages/persistence/src/template/template-data.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { templates, type IBaseTemplateDTO, type ITemplateDTO } from "@undb/template"
import { env } from "@undb/env"
import { templates,type IBaseTemplateDTO,type ITemplateDTO } from "@undb/template"

function getTemplateImage(folder: string, file: string) {
return "/assets/templates/" + folder + "/" + file
return env.UNDB_BASE_URL + "/assets/templates/" + folder + "/" + file
}

export const templateData: ITemplateDTO[] = [
Expand Down

0 comments on commit ad19393

Please sign in to comment.