db-lab1/routing.hpp

33 lines
916 B
C++
Raw Normal View History

2021-03-05 07:39:47 +00:00
#ifndef _ROUTING_HPP
#define _ROUTING_HPP
#include "router.hpp"
#include "handlers.hpp"
namespace bserv {
bserv::router routes{
bserv::make_path("/", &hello,
bserv::placeholders::response,
bserv::placeholders::session),
bserv::make_path("/register", &user_register,
bserv::placeholders::request,
bserv::placeholders::json_params,
bserv::placeholders::transaction),
bserv::make_path("/login", &user_login,
bserv::placeholders::request,
bserv::placeholders::json_params,
bserv::placeholders::transaction,
bserv::placeholders::session),
bserv::make_path("/logout", &user_logout,
bserv::placeholders::session),
bserv::make_path("/find/<str>", &find_user,
bserv::placeholders::transaction,
2021-03-13 11:33:01 +00:00
bserv::placeholders::_1),
bserv::make_path("/send", &send_request)
2021-03-05 07:39:47 +00:00
};
} // bserv
#endif // _ROUTING_HPP