Change cache date from hidden to created

sql-rework
Tomasz Golinski 2020-03-21 04:52:11 +01:00
rodzic 4282846e8f
commit d2688336e4
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -91,7 +91,7 @@ std::string Okapi::get_user_caches_json(const std::string& uuid, int count, int
std::string Okapi::get_caches_json(const std::string& codes) const {
std::string service = url + OKAPI_caches;
std::string query = "consumer_key=" + key + "&cache_codes=" + codes + "&fields=code|name|location|type|status|difficulty|terrain|owner|region|size2|date_hidden|recommendations|founds|status";
std::string query = "consumer_key=" + key + "&cache_codes=" + codes + "&fields=code|name|location|type|status|difficulty|terrain|owner|region|size2|date_created|recommendations|founds|status";
return curl_post(service, query);
}
@ -167,7 +167,7 @@ Caches Okapi::get_caches(const std::set<std::string>& codes) const {
c.status = unknown;
std::tm tmp;
std::stringstream ss(el.value()["date_hidden"].get<std::string>());
std::stringstream ss(el.value()["date_created"].get<std::string>());
ss >> std::get_time(&tmp, "%Y-%m-%dT%H:%M:%S+");
c.set_date_hidden(tmp);