chore: add PingResp
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
use serde::Serialize;
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub struct Ping {}
|
||||
mod ping;
|
||||
pub use ping::{Ping, PingResp};
|
||||
|
||||
mod get_user_preview_api;
|
||||
pub use get_user_preview_api::{GetUserPreviewApi, GetUserPreviewApiResp};
|
||||
|
||||
18
sdgb-api/src/title/model/ping/mod.rs
Normal file
18
sdgb-api/src/title/model/ping/mod.rs
Normal file
@@ -0,0 +1,18 @@
|
||||
use std::fmt::Display;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub struct Ping {}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
pub struct PingResp {
|
||||
result: String,
|
||||
}
|
||||
|
||||
impl Display for PingResp {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
f.write_str(&self.result)?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user