-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from hexresearch/overview-page-2
Overview page api, templates and querying
- Loading branch information
Showing
13 changed files
with
5,355 additions
and
8 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
pub mod types; | ||
pub mod operator; | ||
pub mod public; | ||
pub mod operator; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
use rocket::serde::json::Json; | ||
use rocket_okapi::okapi::schemars; | ||
use rocket_okapi::okapi::schemars::JsonSchema; | ||
use serde::{Deserialize, Serialize}; | ||
|
||
use hexstody_db::domain::currency::Currency; | ||
|
||
#[derive(Debug, Serialize, Deserialize, JsonSchema)] | ||
pub struct BalanceItem { | ||
pub currency: Currency, | ||
pub value: u64, | ||
} | ||
|
||
#[derive(Debug, Serialize, Deserialize, JsonSchema)] | ||
pub struct DepositHistoryItem { | ||
pub currency: Currency, | ||
pub value: u64, | ||
} | ||
|
||
#[derive(Debug, Serialize, Deserialize, JsonSchema)] | ||
pub struct WithdrawalHistoryItem { | ||
pub currency: Currency, | ||
pub value: u64, | ||
} | ||
|
||
#[derive(Debug, Serialize, Deserialize, JsonSchema)] | ||
#[serde(tag = "type")] | ||
#[serde(rename_all = "camelCase")] | ||
pub enum HistoryItem { | ||
Deposit(DepositHistoryItem), | ||
Withdrawal(WithdrawalHistoryItem), | ||
} | ||
#[derive(Debug, Serialize, Deserialize, JsonSchema)] | ||
pub struct Balance { | ||
pub balances: Vec<BalanceItem>, | ||
} | ||
|
||
#[derive(Debug, Serialize, Deserialize, JsonSchema)] | ||
pub struct History { | ||
pub history_items: Vec<HistoryItem>, | ||
} |
Oops, something went wrong.