chore: Prettified Code

[ci skip]
This commit is contained in:
maikirakiwi 2022-10-17 02:52:21 +00:00 committed by cider-chore[bot]
parent 4cb8cf5a19
commit 4a1cf5fed8
2 changed files with 14 additions and 7 deletions

View file

@ -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);