-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ed22a7b
commit eeb7f24
Showing
8 changed files
with
58 additions
and
5 deletions.
There are no files selected for viewing
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,18 @@ | ||
use serde::{Deserialize, Serialize}; | ||
|
||
#[derive(Deserialize, Serialize)] | ||
pub struct EventResponse<'a> { | ||
code: u16, | ||
msg: &'a str, | ||
next: u16, | ||
} | ||
|
||
pub const EVENT: EventResponse = EventResponse { code: 200, msg: "OK", next: 180 }; | ||
|
||
#[derive(Deserialize, Serialize)] | ||
pub struct MiscResponse<'a> { | ||
code: u16, | ||
msg: &'a str, | ||
} | ||
|
||
pub const BATCH_EVENT: MiscResponse = MiscResponse { code: 200, msg: "OK" }; |
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 was deleted.
Oops, something went wrong.
Empty file.
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,15 @@ | ||
use axum::Json; | ||
|
||
use crate::models::{EventResponse, MiscResponse, BATCH_EVENT, EVENT}; | ||
|
||
pub async fn event<'a>() -> Json<EventResponse<'a>> { | ||
Json(EVENT) | ||
} | ||
|
||
pub async fn batch_event<'a>() -> Json<MiscResponse<'a>> { | ||
Json(BATCH_EVENT) | ||
} | ||
|
||
pub async fn beat<'a>() -> Json<MiscResponse<'a>> { | ||
Json(BATCH_EVENT) | ||
} |
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 +1,2 @@ | ||
pub mod account; | ||
pub mod misc; |
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