Some Code Cleanup

This commit is contained in:
2023-12-25 21:54:40 +01:00
parent a2687083e0
commit 3108d9bf20
61 changed files with 305 additions and 247 deletions

View File

@@ -18,8 +18,8 @@
*/
import {fetchWithToken} from "./repo.ts";
import type {SchematicCode, SchematicInfo, SchematicList} from "../types/schem.ts";
import {SchematicCodeSchema, SchematicInfoSchema, SchematicListSchema} from "../types/schem.ts";
import type {SchematicCode, SchematicInfo, SchematicList} from "@type/schem.ts";
import {SchematicCodeSchema, SchematicInfoSchema, SchematicListSchema} from "@type/schem.ts";
export class SchematicRepo {
constructor(private token: string) {}
@@ -41,12 +41,12 @@ export class SchematicRepo {
}
public async uploadSchematic(name: string, content: string) {
return await fetchWithToken(this.token, `/schem`, {
return await fetchWithToken(this.token, "/schem", {
method: "POST",
body: JSON.stringify({
name,
content
})
})
});
}
}