update method names

This commit is contained in:
Mads Rasmussen
2023-11-16 10:44:38 +01:00
parent fc459b10fd
commit a81549ad2a
2 changed files with 4 additions and 4 deletions

View File

@@ -30,7 +30,7 @@ export class UmbDataTypeDetailRepository
if (!id) throw new Error('Key is missing');
await this._init;
const { data, error } = await this.#detailSource.get(id);
const { data, error } = await this.#detailSource.read(id);
if (data) {
this._detailStore!.append(data);
@@ -56,7 +56,7 @@ export class UmbDataTypeDetailRepository
if (!dataType.id) throw new Error('Data Type id is missing');
await this._init;
const { error } = await this.#detailSource.insert(dataType);
const { error } = await this.#detailSource.create(dataType);
if (!error) {
// TODO: We need to push a new item to the tree store to update the tree. How do we want to create the tree items?

View File

@@ -23,7 +23,7 @@ export class UmbDataTypeFolderRepository extends UmbDataTypeRepositoryBase imple
if (!folderRequest) throw new Error('folder request is missing');
await this._init;
const { error } = await this.#folderSource.insert(folderRequest);
const { error } = await this.#folderSource.create(folderRequest);
if (!error) {
// TODO: We need to push a new item to the tree store to update the tree. How do we want to create the tree items?
@@ -64,6 +64,6 @@ export class UmbDataTypeFolderRepository extends UmbDataTypeRepositoryBase imple
async requestFolder(id: string) {
if (!id) throw new Error('Key is missing');
await this._init;
return await this.#folderSource.get(id);
return await this.#folderSource.read(id);
}
}