1
0
mirror of https://github.com/flarum/core.git synced 2025-07-17 14:51:19 +02:00

feat: publish assets on admin dashboard cache clear (#3564)

Co-authored-by: Sami Mazouz <ilyasmazouz@gmail.com>
This commit is contained in:
David Wheatley
2022-07-26 13:48:04 +01:00
committed by GitHub
parent fe20e2c212
commit 2defb17cc2
5 changed files with 57 additions and 3 deletions

View File

@@ -56,6 +56,14 @@ export default class StatusWidget extends DashboardWidget {
method: 'DELETE',
url: app.forum.attribute('apiUrl') + '/cache',
})
.then(() => window.location.reload());
.then(() => window.location.reload())
.catch((e) => {
if (e.status === 409) {
app.alerts.clear();
app.alerts.show({ type: 'error' }, app.translator.trans('core.admin.dashboard.io_error_message'));
}
app.modal.close();
});
}
}