From 56415888490792ddd3b04d9af19e82f86c0b08f0 Mon Sep 17 00:00:00 2001 From: Justin Hiemstra Date: Fri, 23 Feb 2024 18:46:27 +0000 Subject: [PATCH] When `get_lot_as_json` without recursive, return "owner" To distinguish between a lot's personal owner and those who own the lot through inheritance, the `get_lot_as_json` function will return something like ``` "owners": ["owner1", "owner2"] ``` when called with recursion, and something like ``` "owner": "owner1" ``` when called without. The distinction here is that "owner" MUST map to the lot's personal owner, whereas "owners" is a list of all owners, including the personal owner. --- src/lotman.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lotman.cpp b/src/lotman.cpp index d8f4611..059199e 100644 --- a/src/lotman.cpp +++ b/src/lotman.cpp @@ -1522,7 +1522,7 @@ int lotman_get_lot_as_json(const char *lot_name, const bool recursive, char **ou output_obj["owners"] = rp_vec_str.first; } else { - output_obj["owners"] = rp_vec_str.first[0]; // Only one owner, this is where it will be. + output_obj["owner"] = rp_vec_str.first[0]; // Only one owner, this is where it will be. } // Add parents according to recursive flag