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