mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: adding console.log
This commit is contained in:
parent
ded56c518d
commit
735b540af4
6 changed files with 63 additions and 64 deletions
|
@ -11,7 +11,6 @@ const getGameBackupPreview = async (
|
||||||
) => {
|
) => {
|
||||||
const backupPath = path.join(backupsPath, `${shop}-${objectId}`);
|
const backupPath = path.join(backupsPath, `${shop}-${objectId}`);
|
||||||
|
|
||||||
console.log("preview invoked>>");
|
|
||||||
return Ludusavi.getBackupPreview(shop, objectId, backupPath);
|
return Ludusavi.getBackupPreview(shop, objectId, backupPath);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -36,11 +36,11 @@ export const watchAchievements = async () => {
|
||||||
|
|
||||||
if (!gameAchievementFiles.length) continue;
|
if (!gameAchievementFiles.length) continue;
|
||||||
|
|
||||||
// console.log(
|
console.log(
|
||||||
// "Achievements files to observe for:",
|
"Achievements files to observe for:",
|
||||||
// game.title,
|
game.title,
|
||||||
// gameAchievementFiles
|
gameAchievementFiles
|
||||||
// );
|
);
|
||||||
|
|
||||||
for (const file of gameAchievementFiles) {
|
for (const file of gameAchievementFiles) {
|
||||||
compareFile(game, file);
|
compareFile(game, file);
|
||||||
|
|
|
@ -72,7 +72,7 @@ export const updateLocalUnlockedAchivements = async (game: Game) => {
|
||||||
|
|
||||||
gameAchievementFiles.push(...achievementFileInsideDirectory);
|
gameAchievementFiles.push(...achievementFileInsideDirectory);
|
||||||
|
|
||||||
// console.log("Achievements files for", game.title, gameAchievementFiles);
|
console.log("Achievements files for", game.title, gameAchievementFiles);
|
||||||
|
|
||||||
const unlockedAchievements: UnlockedAchievement[] = [];
|
const unlockedAchievements: UnlockedAchievement[] = [];
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ import {
|
||||||
UserNotLoggedInError,
|
UserNotLoggedInError,
|
||||||
UserWithoutCloudSubscriptionError,
|
UserWithoutCloudSubscriptionError,
|
||||||
} from "@shared";
|
} from "@shared";
|
||||||
// import { omit } from "lodash-es";
|
import { omit } from "lodash-es";
|
||||||
import { appVersion } from "@main/constants";
|
import { appVersion } from "@main/constants";
|
||||||
|
|
||||||
interface HydraApiOptions {
|
interface HydraApiOptions {
|
||||||
|
@ -109,59 +109,59 @@ export class HydraApi {
|
||||||
});
|
});
|
||||||
|
|
||||||
if (this.ADD_LOG_INTERCEPTOR) {
|
if (this.ADD_LOG_INTERCEPTOR) {
|
||||||
// this.instance.interceptors.request.use(
|
this.instance.interceptors.request.use(
|
||||||
// (request) => {
|
(request) => {
|
||||||
// logger.log(" ---- REQUEST -----");
|
logger.log(" ---- REQUEST -----");
|
||||||
// const data = Array.isArray(request.data)
|
const data = Array.isArray(request.data)
|
||||||
// ? request.data
|
? request.data
|
||||||
// : omit(request.data, ["refreshToken"]);
|
: omit(request.data, ["refreshToken"]);
|
||||||
// logger.log(request.method, request.url, request.params, data);
|
logger.log(request.method, request.url, request.params, data);
|
||||||
// return request;
|
return request;
|
||||||
// },
|
},
|
||||||
// (error) => {
|
(error) => {
|
||||||
// logger.error("request error", error);
|
logger.error("request error", error);
|
||||||
// return Promise.reject(error);
|
return Promise.reject(error);
|
||||||
// }
|
}
|
||||||
// );
|
);
|
||||||
// this.instance.interceptors.response.use(
|
this.instance.interceptors.response.use(
|
||||||
// (response) => {
|
(response) => {
|
||||||
// logger.log(" ---- RESPONSE -----");
|
logger.log(" ---- RESPONSE -----");
|
||||||
// const data = Array.isArray(response.data)
|
const data = Array.isArray(response.data)
|
||||||
// ? response.data
|
? response.data
|
||||||
// : omit(response.data, ["username", "accessToken", "refreshToken"]);
|
: omit(response.data, ["username", "accessToken", "refreshToken"]);
|
||||||
// logger.log(
|
logger.log(
|
||||||
// response.status,
|
response.status,
|
||||||
// response.config.method,
|
response.config.method,
|
||||||
// response.config.url,
|
response.config.url,
|
||||||
// data
|
data
|
||||||
// );
|
);
|
||||||
// return response;
|
return response;
|
||||||
// },
|
},
|
||||||
// (error) => {
|
(error) => {
|
||||||
// logger.error(" ---- RESPONSE ERROR -----");
|
logger.error(" ---- RESPONSE ERROR -----");
|
||||||
// const { config } = error;
|
const { config } = error;
|
||||||
// logger.error(
|
logger.error(
|
||||||
// config.method,
|
config.method,
|
||||||
// config.baseURL,
|
config.baseURL,
|
||||||
// config.url,
|
config.url,
|
||||||
// config.headers,
|
config.headers,
|
||||||
// config.data
|
config.data
|
||||||
// );
|
);
|
||||||
// if (error.response) {
|
if (error.response) {
|
||||||
// logger.error(
|
logger.error(
|
||||||
// "Response",
|
"Response",
|
||||||
// error.response.status,
|
error.response.status,
|
||||||
// error.response.data
|
error.response.data
|
||||||
// );
|
);
|
||||||
// } else if (error.request) {
|
} else if (error.request) {
|
||||||
// logger.error("Request", error.request);
|
logger.error("Request", error.request);
|
||||||
// } else {
|
} else {
|
||||||
// logger.error("Error", error.message);
|
logger.error("Error", error.message);
|
||||||
// }
|
}
|
||||||
// logger.error(" ----- END RESPONSE ERROR -------");
|
logger.error(" ----- END RESPONSE ERROR -------");
|
||||||
// return Promise.reject(error);
|
return Promise.reject(error);
|
||||||
// }
|
}
|
||||||
// );
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const userAuth = await userAuthRepository.findOne({
|
const userAuth = await userAuthRepository.findOne({
|
||||||
|
|
|
@ -81,10 +81,10 @@ export function BottomPanel() {
|
||||||
<small>{status}</small>
|
<small>{status}</small>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<small>
|
{/* <small>
|
||||||
{sessionHash ? `${sessionHash} -` : ""} v{version} "
|
{sessionHash ? `${sessionHash} -` : ""} v{version} "
|
||||||
{VERSION_CODENAME}"
|
{VERSION_CODENAME}"
|
||||||
</small>
|
</small> */}
|
||||||
</footer>
|
</footer>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,7 +54,7 @@ export function UploadBackgroundImageButton() {
|
||||||
disabled={isUploadingBackgroundImage}
|
disabled={isUploadingBackgroundImage}
|
||||||
>
|
>
|
||||||
<UploadIcon />
|
<UploadIcon />
|
||||||
{isUploadingBackgroundImage ? "Uploading..." : "Upload background"}
|
{isUploadingBackgroundImage ? "Uploading..." : "Atualizar banner"}
|
||||||
</Button>
|
</Button>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue