This commit is contained in:
Eugene Pankov
2021-07-11 22:28:50 +02:00
parent da8a631a6d
commit 3704dcc483
9 changed files with 158 additions and 15 deletions

View File

@@ -76,6 +76,11 @@ export class ConfigService {
this.selectConfig(this.configs.find(c => c.id === this.loginService.user.active_config) ?? this.configs[0])
}
async deleteConfig (config: Config) {
await this.http.delete(`/api/1/configs/${config.id}`).toPromise()
this.configs = this.configs.filter(x => x.id !== config.id)
}
private async init () {
this.configs = await this.http.get('/api/1/configs').toPromise()
this.versions = await this.http.get('/api/1/versions').toPromise()