Update api.js
This commit is contained in:
parent
e9591548b4
commit
d1210851aa
1 changed files with 1 additions and 0 deletions
|
|
@ -15,6 +15,7 @@ const showToast = (message, duration = 3000) => {
|
|||
};
|
||||
|
||||
const fetchWithAuth = async (url, options = {}) => {
|
||||
console.log(`Calling server with api key : ${}`)
|
||||
const headers = {
|
||||
...(options.headers || {}),
|
||||
...(state.apiKey ? { 'X-API-Key': state.apiKey } : {}) // Use X-API-Key instead of Bearer
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue