include credentials while making fetch calls

This commit is contained in:
Colin 2021-08-11 15:25:51 -07:00 committed by GitHub
parent 35926e1e6e
commit ecec695272
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,7 +64,9 @@ export default {
methods: {
fetchStatus: async function () {
const url = `${this.item.url}/api.php`;
this.api = await fetch(url)
this.api = await fetch(url{
credentials: 'include'
})
.then((response) => response.json())
.catch((e) => console.log(e));
},