Update stylesheet-workspace.context.ts

This commit is contained in:
Julia Gru
2023-07-31 10:50:30 +02:00
parent a29c64c25b
commit ce9db14c85

View File

@@ -61,6 +61,30 @@ export class UmbStylesheetWorkspaceContext extends UmbWorkspaceContext<UmbStyles
public async save() {
throw new Error('Save method not implemented.');
// const stylesheet = this.getData();
// if (!stylesheet)
// return Promise.reject('Something went wrong, there is no data for partial view you want to save...');
// if (this.getIsNew()) {
// const createRequestBody = {
// name: stylesheet.name,
// content: stylesheet.content,
// parentPath: stylesheet.path + '/',
// }
// this.repository.create(createRequestBody);
// return Promise.resolve();
// }
// if (!stylesheet.path) return Promise.reject('There is no path');
// const updateRequestBody: UpdatePartialViewRequestModel = {
// name: stylesheet.name,
// existingPath: stylesheet.path,
// content: stylesheet.content,
// };
// this.repository.save(stylesheet.path, updateRequestBody);
// return Promise.resolve();
}
async create(parentKey: string | null) {