mirror of
https://github.com/acidicoala/SmokeAPI.git
synced 2025-12-05 21:15:39 -05:00
Fixed koalabox calls
This commit is contained in:
@@ -35,7 +35,6 @@ namespace store::steamclient {
|
||||
construct_ordinal_map(#INTERFACE, ordinal_map[#INTERFACE], function_selector_address);
|
||||
|
||||
#define HOOK_FUNCTION(INTERFACE, FUNC) hook::swap_virtual_func_or_throw( \
|
||||
globals::address_map, \
|
||||
interface, \
|
||||
#INTERFACE"_"#FUNC, \
|
||||
ordinal_map[#INTERFACE][#FUNC], \
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace store::api {
|
||||
try {
|
||||
const String url =
|
||||
"https://raw.githubusercontent.com/acidicoala/public-entitlements/main/steam/v2/store_config.json";
|
||||
const auto kg_config_json = koalabox::http_client::fetch_json(url);
|
||||
const auto kg_config_json = koalabox::http_client::get_json(url);
|
||||
|
||||
return kg_config_json.get<StoreConfig>();
|
||||
} catch (const Exception& e) {
|
||||
|
||||
@@ -7,9 +7,7 @@ namespace store::store_cache {
|
||||
|
||||
std::optional<StoreConfig> get_store_config() {
|
||||
try {
|
||||
const auto config_json = koalabox::cache::read_from_cache(KEY_KG_CONFIG);
|
||||
|
||||
return config_json.get<StoreConfig>();
|
||||
return koalabox::cache::get(KEY_KG_CONFIG, Json(nullptr)).get<StoreConfig>();
|
||||
} catch (const Exception& e) {
|
||||
LOG_ERROR("Failed to get cached store_mode config: {}", e.what())
|
||||
|
||||
@@ -21,7 +19,7 @@ namespace store::store_cache {
|
||||
try {
|
||||
LOG_DEBUG("Caching store_mode config")
|
||||
|
||||
return koalabox::cache::save_to_cache(KEY_KG_CONFIG, Json(config));
|
||||
return koalabox::cache::put(KEY_KG_CONFIG, Json(config));
|
||||
} catch (const Exception& e) {
|
||||
LOG_ERROR("Failed to cache store_mode config: {}", e.what())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user