chore: Prettified Code
[ci skip]
This commit is contained in:
parent
4cb8cf5a19
commit
4a1cf5fed8
2 changed files with 14 additions and 7 deletions
|
@ -85,9 +85,11 @@ export class utils {
|
|||
* @param opts {object} Other options
|
||||
*/
|
||||
static async fetch(url: string, opts = {}) {
|
||||
Object.assign(opts, { headers: {
|
||||
"User-Agent": utils.getWindow().webContents.getUserAgent()}
|
||||
})
|
||||
Object.assign(opts, {
|
||||
headers: {
|
||||
"User-Agent": utils.getWindow().webContents.getUserAgent(),
|
||||
},
|
||||
});
|
||||
if (this.getStoreValue("advanced.experiments").includes("cider_mirror") === true) {
|
||||
if (url.includes("api.github.com/")) {
|
||||
return await fetch(url.replace("api.github.com/", "mirror.api.cider.sh/v2/api/"), opts);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue