mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-30 06:11:03 +00:00
feat: disabled favorite/unfavorite get request for custom games
This commit is contained in:
@@ -13,7 +13,9 @@ const addGameToFavorites = async (
|
|||||||
const game = await gamesSublevel.get(gameKey);
|
const game = await gamesSublevel.get(gameKey);
|
||||||
if (!game) return;
|
if (!game) return;
|
||||||
|
|
||||||
HydraApi.put(`/profile/games/${shop}/${objectId}/favorite`).catch(() => {});
|
if (shop !== "custom") {
|
||||||
|
HydraApi.put(`/profile/games/${shop}/${objectId}/favorite`).catch(() => {});
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await gamesSublevel.put(gameKey, {
|
await gamesSublevel.put(gameKey, {
|
||||||
|
|||||||
@@ -13,7 +13,11 @@ const removeGameFromFavorites = async (
|
|||||||
const game = await gamesSublevel.get(gameKey);
|
const game = await gamesSublevel.get(gameKey);
|
||||||
if (!game) return;
|
if (!game) return;
|
||||||
|
|
||||||
HydraApi.put(`/profile/games/${shop}/${objectId}/unfavorite`).catch(() => {});
|
if (shop !== "custom") {
|
||||||
|
HydraApi.put(`/profile/games/${shop}/${objectId}/unfavorite`).catch(
|
||||||
|
() => {}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await gamesSublevel.put(gameKey, {
|
await gamesSublevel.put(gameKey, {
|
||||||
|
|||||||
Reference in New Issue
Block a user