From 4241c89c179c4950bcfb3400a283c183547b1e9f Mon Sep 17 00:00:00 2001 From: Jean-Patrick Guerrero Date: Fri, 1 Nov 2019 02:04:35 +0100 Subject: [PATCH] http_post_data -> export_url --- API.md | 2 +- init.lua | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/API.md b/API.md index 251afd5..82c92f4 100644 --- a/API.md +++ b/API.md @@ -204,7 +204,7 @@ You can add a stereotype like so: craftguide.group_stereotypes.radioactive = "mod:item" ``` -#### `craftguide.http_post_data` +#### `craftguide.export_url` If set, the mod will export all the cached recipes and usages in a JSON format to the given URL (HTTP support is required¹). diff --git a/init.lua b/init.lua index a2447bf..3703148 100644 --- a/init.lua +++ b/init.lua @@ -1438,7 +1438,7 @@ local function get_init_items() handle_aliases(hash) sort(init_items) - if http and true_str(craftguide.http_post_data) then + if http and true_str(craftguide.export_url) then local post_data = { recipes = recipes_cache, usages = usages_cache, @@ -1446,7 +1446,7 @@ local function get_init_items() } http.fetch_async({ - url = craftguide.http_post_data, + url = craftguide.export_url, post_data = write_json(post_data), }) end