Browse Source
Rename the maker's feed endpoint to just /feed
no-contract-setup-message
Thomas Eizinger
3 years ago
No known key found for this signature in database
GPG Key ID: 651AC83A6C6C8B96
2 changed files with
2 additions and
2 deletions
-
daemon/src/routes_maker.rs
-
frontend/src/Maker.tsx
|
@ -12,7 +12,7 @@ use serde::Deserialize; |
|
|
use tokio::select; |
|
|
use tokio::select; |
|
|
use tokio::sync::{mpsc, watch}; |
|
|
use tokio::sync::{mpsc, watch}; |
|
|
|
|
|
|
|
|
#[rocket::get("/maker-feed")] |
|
|
#[rocket::get("/feed")] |
|
|
pub async fn maker_feed( |
|
|
pub async fn maker_feed( |
|
|
rx_cfds: &State<watch::Receiver<Vec<Cfd>>>, |
|
|
rx_cfds: &State<watch::Receiver<Vec<Cfd>>>, |
|
|
rx_order: &State<watch::Receiver<Option<Order>>>, |
|
|
rx_order: &State<watch::Receiver<Option<Order>>>, |
|
|
|
@ -40,7 +40,7 @@ async function postCfdSellOrderRequest(payload: CfdSellOrderPayload) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
export default function App() { |
|
|
export default function App() { |
|
|
let source = useEventSource({ source: "/api/maker-feed" }); |
|
|
let source = useEventSource({ source: "/api/feed" }); |
|
|
|
|
|
|
|
|
const cfds = useLatestEvent<Cfd[]>(source, "cfds"); |
|
|
const cfds = useLatestEvent<Cfd[]>(source, "cfds"); |
|
|
const order = useLatestEvent<Order>(source, "order"); |
|
|
const order = useLatestEvent<Order>(source, "order"); |
|
|