Die Abfragen werden erfolgreich vom Server verarbeitet.
This commit is contained in:
@@ -52,19 +52,17 @@
|
||||
console.log(err);
|
||||
});
|
||||
},
|
||||
'add': record => {
|
||||
'add': async record => {
|
||||
console.log(record);
|
||||
// noinspection JSUnresolvedVariable
|
||||
fetch(env.API_URL + '/working-hours', {
|
||||
await fetch(env.API_URL + '/working-hours', {
|
||||
method: 'POST',
|
||||
mode: 'no-cors',
|
||||
mode: 'cors',
|
||||
cache: 'no-cache',
|
||||
credentials: 'same-origin',
|
||||
credentials: 'omit',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
redirect: 'follow',
|
||||
referrerPolicy: 'no-referrer',
|
||||
body: JSON.stringify(record)
|
||||
})
|
||||
.then(res => {
|
||||
@@ -79,19 +77,17 @@
|
||||
console.log(err);
|
||||
});
|
||||
},
|
||||
'update': (date, record) => {
|
||||
'update': async (date, record) => {
|
||||
console.log(record);
|
||||
// noinspection JSUnresolvedVariable
|
||||
fetch(env.API_URL + '/working-hours/' + date, {
|
||||
await fetch(env.API_URL + '/working-hours/' + date, {
|
||||
method: 'PUT',
|
||||
mode: 'no-cors',
|
||||
mode: 'cors',
|
||||
cache: 'no-cache',
|
||||
credentials: 'same-origin',
|
||||
credentials: 'omit',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
redirect: 'follow',
|
||||
referrerPolicy: 'no-referrer',
|
||||
body: JSON.stringify(record)
|
||||
})
|
||||
.then(res => {
|
||||
|
||||
Reference in New Issue
Block a user