mirror of
https://github.com/SomboChea/ui
synced 2026-01-17 00:25:50 +07:00
fix: missing headers on search endpoint with token (#121)
Headers should be part of the options if we override options. https://github.com/verdaccio/ui/issues/118
This commit is contained in:
committed by
GitHub
parent
97e8448098
commit
ac58730e8c
@@ -10,3 +10,9 @@ export async function callDetailPage(packageName): Promise<PackageMetaInterface
|
||||
|
||||
return packageMeta;
|
||||
}
|
||||
|
||||
export function callSearch(value: string, signal: any) {
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API#Browser_compatibility
|
||||
// FUTURE: signal is not well supported for IE and Samsung Browser
|
||||
return API.request(`search/${encodeURIComponent(value)}`, 'GET', { signal, headers: {} });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user