chore: Prettified Code

[ci skip]
This commit is contained in:
cryptofyre 2022-10-14 23:24:02 +00:00 committed by cider-chore[bot]
parent 9745db748b
commit ed7a41bf49

View file

@ -59,18 +59,18 @@ export default class DiscordRPC {
const self = this;
ipcMain.on("discordrpc:updateImage", async (_event, imageurl) => {
if (!this._utils.getStoreValue("general.privateEnabled")) {
fetch("https://api-test.cider.sh/v1/images", {
method: "POST",
headers: {
"User-Agent": this._utils.getWindow().webContents.getUserAgent(),
"url": imageurl
},
})
.then((res) => res.json())
.then(function (json) {
self._attributes["artwork"]["url"] = json.imageUrl;
self.setActivity(self._attributes);
});
fetch("https://api-test.cider.sh/v1/images", {
method: "POST",
headers: {
"User-Agent": this._utils.getWindow().webContents.getUserAgent(),
url: imageurl,
},
})
.then((res) => res.json())
.then(function (json) {
self._attributes["artwork"]["url"] = json.imageUrl;
self.setActivity(self._attributes);
});
}
});
ipcMain.on("discordrpc:reload", (_event, configUpdate = null) => {