mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: sonar suggestions
This commit is contained in:
parent
40f71786f9
commit
b494b28f6f
4 changed files with 5 additions and 4 deletions
|
@ -94,7 +94,7 @@ def seed_status():
|
||||||
|
|
||||||
@app.route("/healthcheck", methods=["GET"])
|
@app.route("/healthcheck", methods=["GET"])
|
||||||
def healthcheck():
|
def healthcheck():
|
||||||
return "", 200
|
return "ok", 200
|
||||||
|
|
||||||
@app.route("/process-list", methods=["GET"])
|
@app.route("/process-list", methods=["GET"])
|
||||||
def process_list():
|
def process_list():
|
||||||
|
|
|
@ -32,7 +32,8 @@ export class HydraApi {
|
||||||
private static readonly EXPIRATION_OFFSET_IN_MS = 1000 * 60 * 5; // 5 minutes
|
private static readonly EXPIRATION_OFFSET_IN_MS = 1000 * 60 * 5; // 5 minutes
|
||||||
private static readonly ADD_LOG_INTERCEPTOR = true;
|
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 = {
|
private static userAuth: HydraApiUserAuth = {
|
||||||
authToken: "",
|
authToken: "",
|
||||||
|
|
|
@ -42,7 +42,6 @@ export const getUserData = () => {
|
||||||
})
|
})
|
||||||
.catch(async (err) => {
|
.catch(async (err) => {
|
||||||
if (err instanceof UserNotLoggedInError) {
|
if (err instanceof UserNotLoggedInError) {
|
||||||
logger.info("User is not logged in", err);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
logger.error("Failed to get logged user");
|
logger.error("Failed to get logged user");
|
||||||
|
|
|
@ -151,7 +151,8 @@ contextBridge.exposeInMainWorld("electron", {
|
||||||
onAchievementUnlocked: (cb: () => void) => {
|
onAchievementUnlocked: (cb: () => void) => {
|
||||||
const listener = (_event: Electron.IpcRendererEvent) => cb();
|
const listener = (_event: Electron.IpcRendererEvent) => cb();
|
||||||
ipcRenderer.on("on-achievement-unlocked", listener);
|
ipcRenderer.on("on-achievement-unlocked", listener);
|
||||||
return () => ipcRenderer.removeListener("on-achievement-unlocked", listener);
|
return () =>
|
||||||
|
ipcRenderer.removeListener("on-achievement-unlocked", listener);
|
||||||
},
|
},
|
||||||
|
|
||||||
/* Hardware */
|
/* Hardware */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue