diff --git a/src/components/SchematicDownload.svelte b/src/components/SchematicDownload.svelte
new file mode 100644
index 0000000..dd31fe2
--- /dev/null
+++ b/src/components/SchematicDownload.svelte
@@ -0,0 +1,17 @@
+
+
+{#await schematic then schem}
+
{schem.name}
+
+{:catch error}
+ {error.message}
+{/await}
diff --git a/src/components/repo/schem.ts b/src/components/repo/schem.ts
index 3ec6846..e83edb4 100644
--- a/src/components/repo/schem.ts
+++ b/src/components/repo/schem.ts
@@ -39,11 +39,11 @@ export class SchematicRepo {
}
public async getSchematicCodeInfo(code: string): Promise {
- return await fetchWithToken(this.token, `/schem/download/${code}/info`).then(value => value.json()).then(SchematicSchema.parse);
+ return await fetchWithToken(this.token, `/download/${code}/info`).then(value => value.json()).then(SchematicSchema.parse);
}
public getSchematicDownloadUrl(code: string): string {
- return `/schem/download/${code}`;
+ return `${import.meta.env.PUBLIC_API_SERVER}/download/${code}`;
}
public async uploadSchematic(name: string, content: string) {
diff --git a/src/pages/schematic.astro b/src/pages/schematic.astro
new file mode 100644
index 0000000..710597b
--- /dev/null
+++ b/src/pages/schematic.astro
@@ -0,0 +1,8 @@
+---
+import PageLayout from "../layouts/PageLayout.astro";
+import SchematicDownload from "@components/SchematicDownload.svelte";
+---
+
+
+
+
\ No newline at end of file