Caching and refactor (#527)
* Caching and refactor * Fix and tweak some parsing * Missing imports * refactor
This commit is contained in:
1 parent
76e9e0c845
commit
5b6b5f5ec3
16 files changed
+357
-208
No files matched your search
@@ -25,7 +25,8 @@ export class InvidiousApi {
|
||||
|
||||
public async searchSuggestions(query: string) {
|
||||
const url = `${this.instance}/api/v1/search/suggestions?q=${encodeURIComponent(query)}®ion=${this.userCountryCode}`;
|
||||
return await this.cachedFetch(url, 60 * 60 * 24);
|
||||
const response = await fetch(url);
|
||||
return await response.json();
|
||||
}
|
||||
|
||||
// need to change this
|
||||
|
||||
Reference in new issue
Block a user