Freelancer profile page handler

template for the profile page and the template for the redirection to the profile page
This commit is contained in:
Tina_Azure
2023-05-10 23:12:51 +02:00
parent 8cadf0cad6
commit dd64311766
3 changed files with 66 additions and 0 deletions

View File

@ -624,6 +624,20 @@ int main(int argc, char *argv[]) {
return page.render(ctx);
});
/*
* Page for freelancer to sign up
*/
CROW_ROUTE(app, "/freelancer/profile")
([&, configuration](const crow::request& getRequest ) {
auto& cookieCtx = app.get_context<crow::CookieParser>(getRequest);
crow::mustache::context ctx;
string templateHTML = TEMPLATE_FREELANCER_PROFILE;
if (Utilities::checkCookieLoginState(configuration, cookieCtx))
ctx[MUSTACHE_COOKIE_LOGGED_IN] = true;
auto page = crow::mustache::load(templateHTML);
return page.render(ctx);
});