Message now all lowercase when returned as json
the build was successful Details

This commit is contained in:
kolaente 2017-12-07 10:45:33 +01:00 committed by kolaente
parent b4c6d0a3db
commit 0c80f55963
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
14 changed files with 32 additions and 32 deletions

View File

@ -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
}

View File

@ -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

View File

@ -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',

View File

@ -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

View File

@ -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

View File

@ -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',

View File

@ -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

View File

@ -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

View File

@ -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',

View File

@ -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

View File

@ -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

View File

@ -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',

View File

@ -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

View File

@ -2,5 +2,5 @@ package models
// Message is a standard message
type Message struct {
Message string
Message string `json:"message"`
}