Merge pull request #1140 from tomaioo/fix/security/potential-auth-token-leakage-to-third-pa

This commit is contained in:
Violet Caulfield
2026-04-25 19:28:22 -05:00
committed by GitHub
+4 -4
View File
@@ -10,10 +10,10 @@ export default async function fetchPatrons(api: Api | undefined): Promise<Patron
return new Promise((resolve, reject) => {
if (!api) return reject(new Error('No API instance provided'))
api.axiosInstance
.get(PATRON_API_ENDPOINT)
.then((res) => {
const patrons = res.data as Patron[]
fetch(PATRON_API_ENDPOINT)
.then(async (res) => {
if (!res.ok) throw new Error(`Request failed with status ${res.status}`)
const patrons = (await res.json()) as Patron[]
resolve(patrons)
})
.catch((err) => reject(err))