23 lines
521 B
C++
23 lines
521 B
C++
//
|
|
// Created by Kaonnull on 25.05.2021.
|
|
//
|
|
#include <httplib.h>
|
|
#include <soci/soci.h>
|
|
|
|
class Api
|
|
{
|
|
soci::session& sql;
|
|
public:
|
|
Api(soci::session& sql, httplib::Server& server);
|
|
|
|
void RegisterServerHandles(httplib::Server& server);
|
|
|
|
public: // Endpoints
|
|
void add(httplib::Request const& rq, httplib::Response& rs);
|
|
|
|
void files(httplib::Request const& rq, httplib::Response& rs);
|
|
void file(httplib::Request const& rq, httplib::Response& rs);
|
|
|
|
void set_cross_headers(httplib::Response& rs);
|
|
|
|
}; |