update according to api models

This commit is contained in:
Jacob Overgaard
2023-06-20 12:53:16 +02:00
parent 170c050007
commit 3f1e08e2aa
3 changed files with 8 additions and 5 deletions

View File

@@ -56,8 +56,11 @@ export class UmbTemplateDetailServerDataSource
* @return {*}
* @memberof UmbTemplateDetailServerDataSource
*/
async createScaffold() {
return await tryExecuteAndNotify(this.#host, TemplateResource.getTemplateScaffold());
async createScaffold(masterTemplateId: string | null) {
return await tryExecuteAndNotify(
this.#host,
TemplateResource.getTemplateScaffold({ masterTemplateId: masterTemplateId ?? undefined })
);
}
/**

View File

@@ -138,9 +138,9 @@ export class UmbTemplateRepository
//#region DETAILS:
async createScaffold() {
async createScaffold(parentId: string | null) {
await this.#init;
return this.#detailDataSource.createScaffold();
return this.#detailDataSource.createScaffold(parentId);
}
async requestById(id: string) {

View File

@@ -129,7 +129,7 @@ export class UmbTemplateWorkspaceContext extends UmbWorkspaceContext<UmbTemplate
}
async create(parentId: string | null = null) {
const { data } = await this.repository.createScaffold();
const { data } = await this.repository.createScaffold(parentId);
if (!data) return;
this.setIsNew(true);
this.#data.next({ ...data, id: '', name: '', alias: '', $type: 'TemplateResponseModel' });