Merge remote-tracking branch 'upstream/main' into cicd

This commit is contained in:
Luke Bennett 2021-06-16 01:11:03 +01:00
commit 8cfb21203e
No known key found for this signature in database
GPG key ID: A738E9C68D3BF31A
5 changed files with 14 additions and 12 deletions

View file

@ -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)

View file

@ -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

View file

@ -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:

View file

@ -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);
}
}))
{

View file

@ -19,6 +19,10 @@ INLINE Json::Value JsonReturn(T &&val)
{
res["value"] = (Json::Int64)val;
}
else if constexpr (std::is_same_v<T, int64_t>)
{
res["value"] = (Json::Int64)val;
}
else
{
res["value"] = val;