From 1378c0d343028f3d40d7d795422684ab9e6a1599 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 17 Aug 2021 11:27:47 +0200 Subject: Fix client lint --- .../plugin-list-installed.component.ts | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'client/src/app/+admin/plugins/plugin-list-installed') diff --git a/client/src/app/+admin/plugins/plugin-list-installed/plugin-list-installed.component.ts b/client/src/app/+admin/plugins/plugin-list-installed/plugin-list-installed.component.ts index 968abcbe5..85f9879bf 100644 --- a/client/src/app/+admin/plugins/plugin-list-installed/plugin-list-installed.component.ts +++ b/client/src/app/+admin/plugins/plugin-list-installed/plugin-list-installed.component.ts @@ -61,16 +61,16 @@ export class PluginListInstalledComponent implements OnInit { loadMorePlugins () { this.pluginApiService.getPlugins(this.pluginType, this.pagination, this.sort) - .subscribe( - res => { + .subscribe({ + next: res => { this.plugins = this.plugins.concat(res.data) this.pagination.totalItems = res.total this.onDataSubject.next(res.data) }, - err => this.notifier.error(err.message) - ) + error: err => this.notifier.error(err.message) + }) } onNearOfBottom () { @@ -113,16 +113,16 @@ export class PluginListInstalledComponent implements OnInit { if (res === false) return this.pluginApiService.uninstall(plugin.name, plugin.type) - .subscribe( - () => { + .subscribe({ + next: () => { this.notifier.success($localize`${plugin.name} uninstalled.`) this.plugins = this.plugins.filter(p => p.name !== plugin.name) this.pagination.totalItems-- }, - err => this.notifier.error(err.message) - ) + error: err => this.notifier.error(err.message) + }) } async update (plugin: PeerTubePlugin) { @@ -143,8 +143,8 @@ export class PluginListInstalledComponent implements OnInit { this.pluginApiService.update(plugin.name, plugin.type) .pipe() - .subscribe( - res => { + .subscribe({ + next: res => { this.updating[updatingKey] = false this.notifier.success($localize`${plugin.name} updated.`) @@ -152,8 +152,8 @@ export class PluginListInstalledComponent implements OnInit { Object.assign(plugin, res) }, - err => this.notifier.error(err.message) - ) + error: err => this.notifier.error(err.message) + }) } getShowRouterLink (plugin: PeerTubePlugin) { -- cgit v1.2.3