From 25f8926841eb0c067f0e2e115db4f1068eb41c85 Mon Sep 17 00:00:00 2001 From: Serein <2075337935@qq.com> Date: Tue, 1 Oct 2024 08:24:07 +0800 Subject: [PATCH] refactor(net): use `/event/list` for getting latest event list --- src/Infrastructure/Network/NetworkClient.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Infrastructure/Network/NetworkClient.cc b/src/Infrastructure/Network/NetworkClient.cc index 3570279c..691e6c1d 100644 --- a/src/Infrastructure/Network/NetworkClient.cc +++ b/src/Infrastructure/Network/NetworkClient.cc @@ -208,8 +208,11 @@ Task> NetworkClient::getActiveEventList( Task> NetworkClient::getLatestEventList( std::chrono::steady_clock::duration cacheTtl) { #ifdef EVENTO_API_V1 - auto result = co_await this->request(http::verb::get, - endpoint("/event/newest"), + auto result = co_await this->request(http::verb::post, + endpoint("/event/list", + {{"departmentId", ""}, + {"typeId", ""}, + {"time", ""}}), {}, cacheTtl); if (result.isErr())