Auth: added
This commit is contained in:
@@ -20,7 +20,10 @@ export default {
|
||||
},
|
||||
async fetchData() {
|
||||
try {
|
||||
const response = await fetch(this.api_url + '/task/get')
|
||||
const response = await fetch(this.api_url + '/task/get', {
|
||||
credentials: 'include'
|
||||
})
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(`HTTP error! Status: ${response.status}`)
|
||||
}
|
||||
@@ -36,6 +39,7 @@ export default {
|
||||
try {
|
||||
const response = await fetch(this.api_url + url, {
|
||||
method: 'POST',
|
||||
credentials: 'include',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
|
Reference in New Issue
Block a user