feat: sonar suggestions

This commit is contained in:
Zamitto 2025-01-05 13:59:16 -03:00
parent 40f71786f9
commit b494b28f6f
4 changed files with 5 additions and 4 deletions

View File

@ -94,7 +94,7 @@ def seed_status():
@app.route("/healthcheck", methods=["GET"])
def healthcheck():
return "", 200
return "ok", 200
@app.route("/process-list", methods=["GET"])
def process_list():

View File

@ -32,7 +32,8 @@ export class HydraApi {
private static readonly EXPIRATION_OFFSET_IN_MS = 1000 * 60 * 5; // 5 minutes
private static readonly ADD_LOG_INTERCEPTOR = true;
private static secondsToMilliseconds = (seconds: number) => seconds * 1000;
private static readonly secondsToMilliseconds = (seconds: number) =>
seconds * 1000;
private static userAuth: HydraApiUserAuth = {
authToken: "",

View File

@ -42,7 +42,6 @@ export const getUserData = () => {
})
.catch(async (err) => {
if (err instanceof UserNotLoggedInError) {
logger.info("User is not logged in", err);
return null;
}
logger.error("Failed to get logged user");

View File

@ -151,7 +151,8 @@ contextBridge.exposeInMainWorld("electron", {
onAchievementUnlocked: (cb: () => void) => {
const listener = (_event: Electron.IpcRendererEvent) => cb();
ipcRenderer.on("on-achievement-unlocked", listener);
return () => ipcRenderer.removeListener("on-achievement-unlocked", listener);
return () =>
ipcRenderer.removeListener("on-achievement-unlocked", listener);
},
/* Hardware */