Remove commented out HTTP API
This commit is contained in:
parent
f9a6a86bad
commit
c44346774a
@ -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})
|
||||
|
Loading…
x
Reference in New Issue
Block a user