From ec46ad32902a1bc38afc431ef000b8c05e1b5c59 Mon Sep 17 00:00:00 2001 From: chatlanin Date: Thu, 25 Jul 2024 10:04:25 +0300 Subject: [PATCH] add static --- src/trs/trs.hpp | 2 +- tests/main.cpp | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/trs/trs.hpp b/src/trs/trs.hpp index 0b14ccc..e4ab1f1 100644 --- a/src/trs/trs.hpp +++ b/src/trs/trs.hpp @@ -161,7 +161,7 @@ namespace trs return r; } - auto upload(std::string from, std::string to) + static auto upload(std::string from, std::string to) { auto r = cpr::Get(cpr::Url(from)); diff --git a/tests/main.cpp b/tests/main.cpp index 6cd985c..6d6d889 100644 --- a/tests/main.cpp +++ b/tests/main.cpp @@ -48,9 +48,8 @@ auto main(int argc, char* args[]) -> int auto r1 = cli_2.post("func_name", trs::JSON{{ "key", "test message" }}); auto j = trs::JSON{{ "key", "test message" }}; auto r2 = cli_2.post("func_name", j); - hack::log()(r1.text, r2.status_code); - cli_2.upload("https://file-examples.com/storage/feaf4c715066a139295358c/2017/11/file_example_MP3_700KB.mp3", "/mnt/raid/projects/trs/test.mp3"); + trs::client::upload("https://file-examples.com/storage/feaf4c715066a139295358c/2017/11/file_example_MP3_700KB.mp3", "/mnt/raid/projects/trs/test.mp3"); trs::server srv; srv.init("test service");