Freelancer profile page handler
template for the profile page and the template for the redirection to the profile page
This commit is contained in:
14
src/main.cpp
14
src/main.cpp
@ -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);
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user