Radish alpha
r
Radicle web interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
Simplify authentication logic
Rūdolfs Ošiņš committed 2 years ago
commit 00ff5c1c38e2bec1cdeb3cd733469003b66baaa7
parent a1db517346ad1c51f6ddbb36127ec5dfb005004f
1 file changed +2 -5
modified src/lib/httpd.ts
@@ -139,6 +139,7 @@ async function checkState() {
      httpdState = JSON.parse(rawHttpdState);
    } catch (error) {
      console.error(error);
+
      return;
    }
  }

@@ -153,10 +154,6 @@ async function checkState() {
          scope: config?.scope,
        };

-
        if (httpdState && httpdState.state !== "stopped") {
-
          httpdState.node = node;
-
        }
-

        if (httpdState && httpdState.state === "authenticated") {
          const sess = await api.session.getById(httpdState.session.id);
          const unixTimeInSeconds = Math.floor(Date.now() / 1000);
@@ -169,7 +166,7 @@ async function checkState() {
              node,
            });
          } else {
-
            update(httpdState);
+
            update({ ...httpdState, node });
          }
        } else {
          update({