This repository has been archived on 2024-02-08. You can view files and clone it, but cannot push or open issues or pull requests.
frontend/src/message/index.js

16 lines
416 B
JavaScript

export default {
error(e, context) {
// Build the notification text from error response
let err = e.message
if (e.response && e.response.data && e.response.data.message) {
err += '<br/>' + e.response.data.message
}
// Fire a notification
context.$notify({
type: 'error',
title: 'Error',
text: err
})
}
}