Message now all lowercase when returned as json
the build was successful
Details
the build was successful
Details
This commit is contained in:
parent
b4c6d0a3db
commit
0c80f55963
|
@ -35,7 +35,7 @@ export default {
|
|||
// Hide the loader
|
||||
context.loading = false
|
||||
if (e.response) {
|
||||
context.error = e.response.data.Message
|
||||
context.error = e.response.data.message
|
||||
if (e.response.status === 401) {
|
||||
context.error = context.translate('login').wrong
|
||||
}
|
||||
|
|
|
@ -106,8 +106,8 @@
|
|||
// Build the notification text from error response
|
||||
console.log(e)
|
||||
let err = e.message
|
||||
if (e.response.data.Message) {
|
||||
err += '<br/>' + e.response.data.Message
|
||||
if (e.response.data.message) {
|
||||
err += '<br/>' + e.response.data.message
|
||||
}
|
||||
|
||||
// Fire a notification
|
||||
|
|
|
@ -135,8 +135,8 @@ export default {
|
|||
errorNotification (e) {
|
||||
// Build the notification text from error response
|
||||
let err = e.message
|
||||
if (e.response.data.Message) {
|
||||
err += '<br/>' + e.response.data.Message
|
||||
if (e.response.data.message) {
|
||||
err += '<br/>' + e.response.data.message
|
||||
}
|
||||
|
||||
// Fire a notification
|
||||
|
@ -185,7 +185,7 @@ export default {
|
|||
if (obj) {
|
||||
HTTP.delete('authors/' + obj.id.content)
|
||||
.then(response => {
|
||||
if (response.status === 200 && response.data.Message === 'success') {
|
||||
if (response.status === 200 && response.data.message === 'success') {
|
||||
// Fire a notification
|
||||
this.$notify({
|
||||
type: 'success',
|
||||
|
|
|
@ -71,8 +71,8 @@
|
|||
errorNotification (e) {
|
||||
// Build the notification text from error response
|
||||
let err = e.message
|
||||
if (e.response.data.Message) {
|
||||
err += '<br/>' + e.response.data.Message
|
||||
if (e.response.data.message) {
|
||||
err += '<br/>' + e.response.data.message
|
||||
}
|
||||
|
||||
// Fire a notification
|
||||
|
|
|
@ -63,8 +63,8 @@
|
|||
errorNotification (e) {
|
||||
// Build the notification text from error response
|
||||
let err = e.message
|
||||
if (e.response.data.Message) {
|
||||
err += '<br/>' + e.response.data.Message
|
||||
if (e.response.data.message) {
|
||||
err += '<br/>' + e.response.data.message
|
||||
}
|
||||
|
||||
// Fire a notification
|
||||
|
|
|
@ -150,8 +150,8 @@ export default {
|
|||
errorNotification (e) {
|
||||
// Build the notification text from error response
|
||||
let err = e.message
|
||||
if (e.response.data.Message) {
|
||||
err += '<br/>' + e.response.data.Message
|
||||
if (e.response.data.message) {
|
||||
err += '<br/>' + e.response.data.message
|
||||
}
|
||||
|
||||
// Fire a notification
|
||||
|
@ -211,8 +211,8 @@ export default {
|
|||
this.allStatus = response.data
|
||||
})
|
||||
.catch(e => {
|
||||
if (!e.response.data.Message) {
|
||||
e.response.data = { Message: 'Could not get Status.' }
|
||||
if (!e.response.data.message) {
|
||||
e.response.data = { message: 'Could not get Status.' }
|
||||
}
|
||||
this.errorNotification(e)
|
||||
})
|
||||
|
@ -239,7 +239,7 @@ export default {
|
|||
if (obj) {
|
||||
HTTP.delete('books/' + obj.id.content)
|
||||
.then(response => {
|
||||
if (response.status === 200 && response.data.Message === 'success') {
|
||||
if (response.status === 200 && response.data.message === 'success') {
|
||||
// Fire a notification
|
||||
this.$notify({
|
||||
type: 'success',
|
||||
|
|
|
@ -182,8 +182,8 @@
|
|||
errorNotification (e) {
|
||||
// Build the notification text from error response
|
||||
let err = e.message
|
||||
if (e.response.data.Message) {
|
||||
err += '<br/>' + e.response.data.Message
|
||||
if (e.response.data.message) {
|
||||
err += '<br/>' + e.response.data.message
|
||||
}
|
||||
|
||||
// Fire a notification
|
||||
|
|
|
@ -112,8 +112,8 @@
|
|||
this.loading = false
|
||||
// Build the notification text from error response
|
||||
let err = e.message
|
||||
if (e.response.data.Message) {
|
||||
err += '<br/>' + e.response.data.Message
|
||||
if (e.response.data.message) {
|
||||
err += '<br/>' + e.response.data.message
|
||||
}
|
||||
|
||||
// Fire a notification
|
||||
|
|
|
@ -140,8 +140,8 @@ export default {
|
|||
errorNotification (e) {
|
||||
// Build the notification text from error response
|
||||
let err = e.message
|
||||
if (e.response.data.Message) {
|
||||
err += '<br/>' + e.response.data.Message
|
||||
if (e.response.data.message) {
|
||||
err += '<br/>' + e.response.data.message
|
||||
}
|
||||
|
||||
// Fire a notification
|
||||
|
@ -192,7 +192,7 @@ export default {
|
|||
if (obj) {
|
||||
HTTP.delete('items/' + obj.id.content)
|
||||
.then(response => {
|
||||
if (response.status === 200 && response.data.Message === 'success') {
|
||||
if (response.status === 200 && response.data.message === 'success') {
|
||||
// Fire a notification
|
||||
this.$notify({
|
||||
type: 'success',
|
||||
|
|
|
@ -85,8 +85,8 @@
|
|||
errorNotification (e) {
|
||||
// Build the notification text from error response
|
||||
let err = e.message
|
||||
if (e.response.data.Message) {
|
||||
err += '<br/>' + e.response.data.Message
|
||||
if (e.response.data.message) {
|
||||
err += '<br/>' + e.response.data.message
|
||||
}
|
||||
|
||||
// Fire a notification
|
||||
|
|
|
@ -99,8 +99,8 @@
|
|||
this.loading = false
|
||||
// Build the notification text from error response
|
||||
let err = e.message
|
||||
if (e.response.data.Message) {
|
||||
err += '<br/>' + e.response.data.Message
|
||||
if (e.response.data.message) {
|
||||
err += '<br/>' + e.response.data.message
|
||||
}
|
||||
|
||||
// Fire a notification
|
||||
|
|
|
@ -135,8 +135,8 @@ export default {
|
|||
errorNotification (e) {
|
||||
// Build the notification text from error response
|
||||
let err = e.message
|
||||
if (e.response.data.Message) {
|
||||
err += '<br/>' + e.response.data.Message
|
||||
if (e.response.data.message) {
|
||||
err += '<br/>' + e.response.data.message
|
||||
}
|
||||
|
||||
// Fire a notification
|
||||
|
@ -184,7 +184,7 @@ export default {
|
|||
if (obj) {
|
||||
HTTP.delete('publishers/' + obj.id.content)
|
||||
.then(response => {
|
||||
if (response.status === 200 && response.data.Message === 'success') {
|
||||
if (response.status === 200 && response.data.message === 'success') {
|
||||
// Fire a notification
|
||||
this.$notify({
|
||||
type: 'success',
|
||||
|
|
|
@ -64,8 +64,8 @@
|
|||
errorNotification (e) {
|
||||
// Build the notification text from error response
|
||||
let err = e.message
|
||||
if (e.response.data.Message) {
|
||||
err += '<br/>' + e.response.data.Message
|
||||
if (e.response.data.message) {
|
||||
err += '<br/>' + e.response.data.message
|
||||
}
|
||||
|
||||
// Fire a notification
|
||||
|
|
|
@ -2,5 +2,5 @@ package models
|
|||
|
||||
// Message is a standard message
|
||||
type Message struct {
|
||||
Message string
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue