[AAE-4364] Add delete release api call (#6526)

* [AAE-4364] Add delete release api call

* [AAE-4364] Add missing promise
This commit is contained in:
Nanna Setämaa
2021-01-13 11:51:30 +00:00
committed by GitHub
parent d29fbecc53
commit 9f6f44333e

View File

@@ -88,6 +88,16 @@ export class Project {
}
}
async deleteRelease(releaseId: string): Promise<void> {
Logger.info(`[Project] Delete project release ${releaseId}`);
try {
await this.requestApiHelper.delete(`modeling-service/v1/releases/${releaseId}`);
Logger.info(`[Project] Release ${releaseId} was deleted successfully`);
} catch (error) {
throw new Error(`Delete project release ${releaseId} failed: ${JSON.stringify(error)}`);
}
}
async import(projectFilePath: string): Promise<NodeEntry> {
const fileContent = await fs.createReadStream(projectFilePath);
const requestOptions: E2eRequestApiHelperOptions = {