1
0
Fork 0
mirror of synced 2024-06-17 18:04:42 +12:00

Add missing applications endpoints

This commit is contained in:
Pedro Silva 2022-10-04 17:12:38 +01:00
parent f488e03bda
commit 8dd309f6a5

View file

@ -53,4 +53,29 @@ export default class AppApi {
return [response, json]
}
async update(appId: string, body: any): Promise<[Response, Application]> {
const response = await this.api.put(`/applications/${appId}/client/update`, { body })
const json = await response.json()
return [response, json]
}
async revert(appId: string): Promise<[Response, Application]> {
const response = await this.api.post(`/applications/${appId}/client/revert`)
const json = await response.json()
return [response, json]
}
async delete(appId: string): Promise<[Response, any]> {
const response = await this.api.del(`/applications/${appId}`)
const json = await response.json()
return [response, json]
}
async getAppDefinition(appId: string): Promise<[Response, any]> {
const response = await this.api.get(`/applications/${appId}/definition`)
const json = await response.json()
return [response, json]
}
}