mirror of
https://github.com/flarum/framework.git
synced 2025-05-22 14:49:57 +08:00
Clean up some old code
This commit is contained in:
@ -295,23 +295,6 @@ export default class App {
|
||||
this.modal.show(new RequestErrorModal({error}));
|
||||
}
|
||||
|
||||
/**
|
||||
* Show alert error messages for each error returned in an API response.
|
||||
*
|
||||
* @param {Object} response
|
||||
* @public
|
||||
*/
|
||||
alertErrors(response) {
|
||||
if (response.errors) {
|
||||
response.errors.forEach(error => {
|
||||
this.alerts.show(new Alert({
|
||||
type: 'error',
|
||||
children: error.detail
|
||||
}));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a URL to the route with the given name.
|
||||
*
|
||||
|
Reference in New Issue
Block a user