diff --git a/src/components/dashboard/SchematicInfoModal.svelte b/src/components/dashboard/SchematicInfoModal.svelte index 8dc1f1d..0af7fea 100644 --- a/src/components/dashboard/SchematicInfoModal.svelte +++ b/src/components/dashboard/SchematicInfoModal.svelte @@ -24,19 +24,12 @@ import {createEventDispatcher} from "svelte"; import type {Player} from "@type/data.ts"; import dayjs from "dayjs"; - import {schemRepo} from "@repo/schem.ts"; import SWModal from "@components/styled/SWModal.svelte"; const dispatch = createEventDispatcher(); export let info: SchematicInfo; export let user: Player; - - async function download() { - const code = await $schemRepo.createDownload(info.schem.id); - window.open(import.meta.env.PUBLIC_API_SERVER + "/download/" + code.code, "_blank") - dispatch("reset") - } dispatch("reset")}> @@ -71,9 +64,6 @@

{t("dashboard.schematic.info.members", {members: info.members.map(value => value.name).join(", ")})}

{/if} - {#if (info.schem.owner === user.id)} - - {/if}
\ No newline at end of file diff --git a/src/components/repo/schem.ts b/src/components/repo/schem.ts index b711fb1..9392c0f 100644 --- a/src/components/repo/schem.ts +++ b/src/components/repo/schem.ts @@ -37,10 +37,6 @@ export class SchematicRepo { return await fetchWithToken(this.token, `/schem/${id}`).then(value => value.json()).then(SchematicInfoSchema.parse); } - public async createDownload(id: number): Promise { - return await fetchWithToken(this.token, `/schem/${id}/download`).then(value => value.json()).then(SchematicCodeSchema.parse); - } - public async uploadSchematic(name: string, content: string) { return await fetchWithToken(this.token, "/schem", { method: "POST", diff --git a/steamwarci.yml b/steamwarci.yml index 26f3071..5f5dde5 100644 --- a/steamwarci.yml +++ b/steamwarci.yml @@ -1,5 +1,5 @@ build: - - "echo 'PUBLIC_API_SERVER=https://steamwar.de/eventplanner-api/'" + - "echo 'PUBLIC_API_SERVER=https://steamwar.de/api/'" - "pnpm run ci" release: