diff --git a/APIs.md b/APIs.md index d39a8a7..7aadd85 100644 --- a/APIs.md +++ b/APIs.md @@ -1,10 +1,10 @@ # Language Specific APIs ## Complete +* [JS API](https://github.com/LukeeeeBennett/ccash-client-js) +* [ComputerCraft (Lua) API](https://github.com/Reactified/rpm/blob/main/packages/ccash-api/api.lua) ## 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) * [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) diff --git a/README.md b/README.md index b4b4731..57e579d 100644 --- a/README.md +++ b/README.md @@ -66,8 +66,8 @@ 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 | +| [Jolly](https://github.com/STBoyden) | Slight Doc edits | ## Features 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: 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); } })) { diff --git a/src/bank_f.cpp b/src/bank_f.cpp index b9cdfe5..de8cb40 100644 --- a/src/bank_f.cpp +++ b/src/bank_f.cpp @@ -19,6 +19,10 @@ INLINE Json::Value JsonReturn(T &&val) { res["value"] = (Json::Int64)val; } + else if constexpr (std::is_same_v) + { + res["value"] = (Json::Int64)val; + } else { res["value"] = val;