18 lines
385 B
C++
18 lines
385 B
C++
#ifndef AUTH_MIDDLEWARE_HPP
|
|
#define AUTH_MIDDLEWARE_HPP
|
|
#include "crow.h"
|
|
#include "types.hpp"
|
|
#include <vector>
|
|
#include <database.hpp>
|
|
|
|
struct UserAuthMiddleware {
|
|
struct context {
|
|
User user;
|
|
};
|
|
|
|
void before_handle(crow::request& req, crow::response& res, context& ctx);
|
|
|
|
void after_handle(crow::request& req, crow::response& res, context& ctx) {};
|
|
};
|
|
|
|
#endif |