From c44346774a77ab49bfea42d66a5081d795165c4e Mon Sep 17 00:00:00 2001 From: ekzyis Date: Tue, 7 Nov 2023 17:44:02 +0100 Subject: [PATCH] Remove commented out HTTP API --- server/router/handler/session.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/server/router/handler/session.go b/server/router/handler/session.go index eaf2ae3..c3ebe10 100644 --- a/server/router/handler/session.go +++ b/server/router/handler/session.go @@ -17,15 +17,12 @@ func HandleCheckSession(sc context.ServerContext) echo.HandlerFunc { err error ) if cookie, err = c.Cookie("session"); err != nil { - // return echo.NewHTTPError(http.StatusBadRequest, map[string]string{"reason": "cookie required"}) return c.JSON(http.StatusBadRequest, map[string]string{"reason": "cookie required"}) } s = db.Session{SessionId: cookie.Value} if err = sc.Db.FetchSession(&s); err == sql.ErrNoRows { - // return echo.NewHTTPError(http.StatusNotFound, map[string]string{"reason": "session not found"}) return c.JSON(http.StatusBadRequest, map[string]string{"reason": "session not found"}) } else if err != nil { - // return echo.NewHTTPError(http.StatusInternalServerError) return c.JSON(http.StatusInternalServerError, nil) } return c.JSON(http.StatusOK, map[string]string{"pubkey": s.Pubkey})