From f7684177536bcef58c16a0bf1f4bf0c7a2423f45 Mon Sep 17 00:00:00 2001 From: William Katz Date: Tue, 15 Jun 2021 03:11:42 -0700 Subject: [PATCH 1/8] Update APIs.md --- APIs.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/APIs.md b/APIs.md index d39a8a7..42d05e5 100644 --- a/APIs.md +++ b/APIs.md @@ -1,10 +1,10 @@ # Language Specific APIs ## Complete - -## In Dev * [JS API](https://github.com/LukeeeeBennett/ccash-client-js) * [CC API](https://github.com/Reactified/rpm/blob/main/packages/ccash-api/api.lua) + +## In Dev * [Python API](https://github.com/fearlessdoggo21/ccashpythonclient) * [CS API](https://github.com/Soverclysm/CCash-dotnet-api) -* [Rust API](https://git.stboyden.com/STBoyden/ccash-rs) \ No newline at end of file +* [Rust API](https://git.stboyden.com/STBoyden/ccash-rs) From 20de9805a906f0854abd1f81de95378c7f5ba26b Mon Sep 17 00:00:00 2001 From: William Katz Date: Tue, 15 Jun 2021 03:12:51 -0700 Subject: [PATCH 2/8] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b4b4731..f9589ed 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ Thank you to the contributors | [Expand](https://github.com/Expand-sys) | Frontend | | [React](https://github.com/Reactified) | CC {API, Shops, and ATM, Logo} | | [Doggo](https://github.com/FearlessDoggo21) | Logs loading/adding Optimized, HTTP convention suggestions | -| [Luke](https://github.com/LukeeeeBennett) | Slight Doc edits | +| [Luke](https://github.com/LukeeeeBennett) | JS API, Slight Doc edits | ## Features From d013abdf4c49226f376935f1f02a2df1690d3f72 Mon Sep 17 00:00:00 2001 From: Samuel Boyden Date: Tue, 15 Jun 2021 14:58:44 +0100 Subject: [PATCH 3/8] Update CC to ComputerCraft (Lua) in APIs.md So as to make it more explicit what language/usage it is. --- APIs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/APIs.md b/APIs.md index 42d05e5..7aadd85 100644 --- a/APIs.md +++ b/APIs.md @@ -2,7 +2,7 @@ ## Complete * [JS API](https://github.com/LukeeeeBennett/ccash-client-js) -* [CC API](https://github.com/Reactified/rpm/blob/main/packages/ccash-api/api.lua) +* [ComputerCraft (Lua) API](https://github.com/Reactified/rpm/blob/main/packages/ccash-api/api.lua) ## In Dev * [Python API](https://github.com/fearlessdoggo21/ccashpythonclient) From ad88f5842b4ab2d5ce5201495d1d6dfa5e9f4eae Mon Sep 17 00:00:00 2001 From: William Katz Date: Tue, 15 Jun 2021 08:07:22 -0700 Subject: [PATCH 4/8] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f9589ed..57e579d 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ Thank you to the contributors | [React](https://github.com/Reactified) | CC {API, Shops, and ATM, Logo} | | [Doggo](https://github.com/FearlessDoggo21) | Logs loading/adding Optimized, HTTP convention suggestions | | [Luke](https://github.com/LukeeeeBennett) | JS API, Slight Doc edits | - +| [Jolly](https://github.com/STBoyden) | Slight Doc edits | ## Features From 73c4a64666ac214c8682867e7f8d344ddc4e97e1 Mon Sep 17 00:00:00 2001 From: William Katz Date: Tue, 15 Jun 2021 08:27:55 -0700 Subject: [PATCH 5/8] Renamed CC ATM --- services.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services.md b/services.md index 4845c6e..e570210 100644 --- a/services.md +++ b/services.md @@ -10,7 +10,7 @@ - [CC Shop](https://github.com/Reactified/rpm/tree/main/packages/ccash-shop) ![image](https://user-images.githubusercontent.com/31377881/120050327-de163700-bfd1-11eb-9d5a-f75c003e867c.png) ![image](https://user-images.githubusercontent.com/31377881/120050367-09992180-bfd2-11eb-9a22-449d73c196cf.png) -- [CC ATM](https://github.com/Reactified/misc/tree/main/lua/ccash-bank) an ATM for economies allowing for an initial exchange to start up +- [CC Reverse ATM](https://github.com/Reactified/misc/tree/main/lua/ccash-bank) an ATM for economies allowing for an initial exchange to start up ![image](https://user-images.githubusercontent.com/31377881/121277361-4d6b1100-c885-11eb-87c8-cfebcf58da4f.png) ### In-Dev: From 17cb1a0c23e9fa493fba885c91a9579d03010fb7 Mon Sep 17 00:00:00 2001 From: EntireTwix Date: Tue, 15 Jun 2021 12:34:15 -0700 Subject: [PATCH 6/8] int 64 cast json --- src/bank_f.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bank_f.cpp b/src/bank_f.cpp index b9cdfe5..4958cc0 100644 --- a/src/bank_f.cpp +++ b/src/bank_f.cpp @@ -19,9 +19,9 @@ INLINE Json::Value JsonReturn(T &&val) { res["value"] = (Json::Int64)val; } - else + else if constexpr (std::is_same_v) { - res["value"] = val; + res["value"] = (Json::Int64)val; } return res; } From 153ff6e39d0e4b8962cce583c366461d52b59984 Mon Sep 17 00:00:00 2001 From: EntireTwix Date: Tue, 15 Jun 2021 13:16:18 -0700 Subject: [PATCH 7/8] temp was extraneous --- src/bank.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/bank.cpp b/src/bank.cpp index 883280a..195af3e 100644 --- a/src/bank.cpp +++ b/src/bank.cpp @@ -202,15 +202,13 @@ Json::Value Bank::GetLogs(const std::string &name, const std::string &attempt) } else { - Json::Value temp; for (uint32_t i = u.log.data.size(); i > 0; --i) { - temp[i - 1]["to"] = u.log.data[u.log.data.size() - i].to; - temp[i - 1]["from"] = u.log.data[u.log.data.size() - i].from; - temp[i - 1]["amount"] = (Json::UInt)u.log.data[u.log.data.size() - i].amount; - temp[i - 1]["time"] = (Json::UInt64)u.log.data[u.log.data.size() - i].time; + res[i - 1]["to"] = u.log.data[u.log.data.size() - i].to; + res[i - 1]["from"] = u.log.data[u.log.data.size() - i].from; + res[i - 1]["amount"] = (Json::UInt)u.log.data[u.log.data.size() - i].amount; + res[i - 1]["time"] = (Json::UInt64)u.log.data[u.log.data.size() - i].time; } - res = std::move(temp); } })) { From a028b9a628a8830b73ff438160895377e024a16a Mon Sep 17 00:00:00 2001 From: EntireTwix Date: Tue, 15 Jun 2021 13:21:21 -0700 Subject: [PATCH 8/8] :bug: silly error --- src/bank_f.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bank_f.cpp b/src/bank_f.cpp index 4958cc0..de8cb40 100644 --- a/src/bank_f.cpp +++ b/src/bank_f.cpp @@ -23,6 +23,10 @@ INLINE Json::Value JsonReturn(T &&val) { res["value"] = (Json::Int64)val; } + else + { + res["value"] = val; + } return res; }