This commit is contained in:
2024-08-15 16:38:50 +02:00
parent 4afd833276
commit 22f24e92c3
19 changed files with 148 additions and 69 deletions

View File

@@ -65,8 +65,8 @@ export class PageRepo {
await fetchWithToken(this.token, "/page/branch", {method: "DELETE", body: JSON.stringify({branch})});
}
public async createFile(path: string, branch: string = "master"): Promise<void> {
await fetchWithToken(this.token, `/page?branch=${branch}`, {method: "POST", body: JSON.stringify({path})});
public async createFile(path: string, branch: string = "master", slug: string | null = null, title: string | null = null): Promise<void> {
await fetchWithToken(this.token, `/page?branch=${branch}`, {method: "POST", body: JSON.stringify({path, slug, title})});
}
public async merge(branch: string, message: string): Promise<void> {