aboutsummaryrefslogtreecommitdiff
path: root/src/app.hpp
diff options
context:
space:
mode:
authorMetroWind <chris.corsair@gmail.com>2025-09-21 21:34:34 -0700
committerMetroWind <chris.corsair@gmail.com>2025-09-21 21:34:34 -0700
commite9686b6ab684785d5f9acbc98942beae94817562 (patch)
tree10ffe1b7b209aee2f0513cd0c42def2c07272ea2 /src/app.hpp
parentb2e812941766e11394bdb124ff73d1fe544849a2 (diff)
Implement dir handler. Unit test WIP.HEADmaster
Diffstat (limited to 'src/app.hpp')
-rw-r--r--src/app.hpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/app.hpp b/src/app.hpp
index 09c7143..02a1206 100644
--- a/src/app.hpp
+++ b/src/app.hpp
@@ -27,9 +27,10 @@ public:
27 std::string urlFor(const std::string& name, const std::string& arg="") 27 std::string urlFor(const std::string& name, const std::string& arg="")
28 const; 28 const;
29 29
30 void handleIndex(Response& res) const;
31 void handleLogin(Response& res) const; 30 void handleLogin(Response& res) const;
32 void handleOpenIDRedirect(const Request& req, Response& res) const; 31 void handleOpenIDRedirect(const Request& req, Response& res) const;
32 void handleIndex(Response& res) const;
33 void handleDir(const Request& req, Response& res);
33 34
34private: 35private:
35 void setup() override; 36 void setup() override;
@@ -63,10 +64,10 @@ private:
63 // this case if this function does return a value, it would never 64 // this case if this function does return a value, it would never
64 // be an invalid session. 65 // be an invalid session.
65 // 66 //
66 // If “allow_error_and_invalid” is true, failure to query and 67 // If “allow_error_and_invalid” is true, this function will never
67 // invalid session are considered ok, and no status and body would 68 // return nullopt. Failure to query and invalid session are
68 // be set in “res”. In this case this function just returns an 69 // considered ok, and no status and body would be set in “res”. In
69 // invalid session. 70 // this case this function just returns an invalid session.
70 std::optional<SessionValidation> prepareSession( 71 std::optional<SessionValidation> prepareSession(
71 const Request& req, Response& res, 72 const Request& req, Response& res,
72 bool allow_error_and_invalid=false) const; 73 bool allow_error_and_invalid=false) const;