This commit is contained in:
parent
d881848fa4
commit
0c7e06f3db
@ -19,6 +19,7 @@ Context::Context(boost::asio::io_context &ioContext) : m_ioContext(ioContext), m
|
||||
manager->subscribe<Older::NotifyServerChan>(
|
||||
[this](const boost::beast::http::request<boost::beast::http::string_body> &request) { notify(request); });
|
||||
}
|
||||
registerMoneyNote();
|
||||
}
|
||||
|
||||
void Context::sendMessage(MessageType type, const std::string &message) {
|
||||
@ -124,5 +125,16 @@ void Context::updateAccessToken() {
|
||||
}
|
||||
}
|
||||
|
||||
void Context::registerMoneyNote() {
|
||||
// 接口说明: https://developer.work.weixin.qq.com/document/10514
|
||||
using namespace Core;
|
||||
using namespace Older;
|
||||
using namespace boost::urls;
|
||||
auto manager = Singleton<MessageManager>::instance();
|
||||
manager->publish<RegisterUrlHandler>(
|
||||
"/api/v1/wx/moneynote",
|
||||
[this](HttpSession &session, const HttpRequest &request, const matches &matches) { LOG(info) << request.target(); });
|
||||
}
|
||||
|
||||
} // namespace Corporation
|
||||
} // namespace WeChat
|
@ -32,6 +32,7 @@ public:
|
||||
protected:
|
||||
Context(boost::asio::io_context &ioContext);
|
||||
void updateAccessToken();
|
||||
void registerMoneyNote();
|
||||
|
||||
private:
|
||||
boost::asio::io_context &m_ioContext;
|
||||
|
@ -51,3 +51,5 @@ function main() {
|
||||
}
|
||||
|
||||
main $@
|
||||
|
||||
# docker run -it -d --name ubuntu -v ~/Projects:/home/amass/Projects registry.cn-shenzhen.aliyuncs.com/amass_toolset/ubuntu_dev:24.04-qt6.9.0
|
||||
|
Loading…
x
Reference in New Issue
Block a user