Skip to content

Commit

Permalink
fix(custom-fetch): update to new ofetch headers implementation (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
maximepvrt authored Oct 16, 2024
1 parent 771153d commit 8746203
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ export default defineNuxtPlugin(() => {
onRequest({ request, options, error }) {

Check warning on line 7 in examples/advanced/use-custom-fetch-composable/plugins/customFetch.ts

View workflow job for this annotation

GitHub Actions / lint

'request' is defined but never used. Allowed unused args must match /^_/u

Check warning on line 7 in examples/advanced/use-custom-fetch-composable/plugins/customFetch.ts

View workflow job for this annotation

GitHub Actions / lint

'error' is defined but never used. Allowed unused args must match /^_/u
if (userAuth.value) {
// Add Authorization header
options.headers = options.headers || {}
options.headers.Authorization = `Bearer ${userAuth.value}`
options.headers.set('Authorization', `Bearer ${userAuth.value}`)
}
},
onResponse({ response }) {

Check warning on line 13 in examples/advanced/use-custom-fetch-composable/plugins/customFetch.ts

View workflow job for this annotation

GitHub Actions / lint

'response' is defined but never used. Allowed unused args must match /^_/u
Expand Down

0 comments on commit 8746203

Please sign in to comment.