From fa39bbff2960a0fc85124d3fa34a7e449cf4f03b Mon Sep 17 00:00:00 2001 From: Robert Barrow Date: Sun, 16 Jun 2019 14:33:30 +0100 Subject: [PATCH] FIX: logs weren't deleting when trash can was pressed --- .../javascripts/discourse/controllers/admin-wizards-api.js.es6 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/assets/javascripts/discourse/controllers/admin-wizards-api.js.es6 b/assets/javascripts/discourse/controllers/admin-wizards-api.js.es6 index 22f18ea8..42451421 100644 --- a/assets/javascripts/discourse/controllers/admin-wizards-api.js.es6 +++ b/assets/javascripts/discourse/controllers/admin-wizards-api.js.es6 @@ -198,6 +198,9 @@ export default Ember.Controller.extend({ }, clearLogs() { + const name = this.get('api.name'); + if (!name) return; + ajax(`/admin/wizards/apis/logs/${name.underscore()}`, { type: 'DELETE' }).catch(popupAjaxError)