From 9d8d578e08a138a538ae5f9ccbf41aaa482ff68a Mon Sep 17 00:00:00 2001 From: Qesait Date: Tue, 16 May 2023 17:59:01 +0300 Subject: [PATCH] word get fix --- .../lib/plugin_wrappers/word/WordPluginWrapper.cpp | 6 +++--- .../plugin_wrappers/word/WordPluginWrapper_tests.cpp | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/client/lib/plugin_wrappers/word/WordPluginWrapper.cpp b/client/lib/plugin_wrappers/word/WordPluginWrapper.cpp index 9fbe460..bd9882d 100644 --- a/client/lib/plugin_wrappers/word/WordPluginWrapper.cpp +++ b/client/lib/plugin_wrappers/word/WordPluginWrapper.cpp @@ -22,10 +22,10 @@ WordPluginWrapper::get(const std::string &word, json request_message = { {"query_type", "get" }, {"plugin_type", plugin_type_ }, - {"query", word }, - {"query_language", query_language}, + {"word", word }, + {"filter", query_language}, {"batch_size", batch_size }, - {"reload", reload ? 1 : 0} + {"restart", reload} }; std::pair response( std::move(connection_->request(request_message.dump()))); diff --git a/client/lib/plugin_wrappers/word/WordPluginWrapper_tests.cpp b/client/lib/plugin_wrappers/word/WordPluginWrapper_tests.cpp index 7b86871..09b1e12 100644 --- a/client/lib/plugin_wrappers/word/WordPluginWrapper_tests.cpp +++ b/client/lib/plugin_wrappers/word/WordPluginWrapper_tests.cpp @@ -18,12 +18,12 @@ TEST(WordPWGet, Output) { json actual = json::parse(memorizer->received_message); json expected = { - {"query_type", "get" }, - {"plugin_type", "word" }, - {"query", "test_word"}, - {"query_language", "pos::noun"}, - {"batch_size", 3 }, - {"reload", 1 } + {"query_type", "get" }, + {"plugin_type", "word" }, + {"word", "test_word"}, + {"filter", "pos::noun"}, + {"batch_size", 3 }, + {"restart", true } }; EXPECT_EQ(expected, actual); } -- GitLab