mirror of
https://github.com/Expand-sys/CCash
synced 2025-12-17 00:22:14 +11:00
🎨 moved macros
This commit is contained in:
parent
482e8709a7
commit
a4964d2742
2 changed files with 5 additions and 4 deletions
|
|
@ -7,13 +7,13 @@ using namespace drogon;
|
|||
|
||||
#define req_args const HttpRequestPtr &req, std::function<void(const HttpResponsePtr &)> &&callback
|
||||
|
||||
#if API_VERSION == 1
|
||||
class api : public HttpController<api, false>
|
||||
{
|
||||
Bank &bank;
|
||||
|
||||
public:
|
||||
api(Bank &b);
|
||||
#if API_VERSION == 1
|
||||
void GetBal(req_args, const std::string &name) const;
|
||||
void GetLog(req_args);
|
||||
void SendFunds(req_args) const;
|
||||
|
|
@ -58,5 +58,5 @@ public:
|
|||
METHOD_ADD(api::AdminDelUser, "/admin/user/{name}", Delete, Options);
|
||||
|
||||
METHOD_LIST_END
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
|
|
@ -42,11 +42,12 @@ constexpr Json::Value JsonCast(T &&val)
|
|||
}
|
||||
}
|
||||
|
||||
#if API_VERSION == 1
|
||||
api::api(Bank &b) : bank(b)
|
||||
{
|
||||
}
|
||||
|
||||
#if API_VERSION == 1
|
||||
|
||||
void api::GetBal(req_args, const std::string &name) const
|
||||
{
|
||||
RESPONSE_PARSE(bank.GetBal(name));
|
||||
|
|
|
|||
Loading…
Reference in a new issue