Add ping endpoint
This commit is contained in:
parent
66fbdbf368
commit
a67bac63b6
3 changed files with 18 additions and 0 deletions
10
backend/sync_server/src/server/ping.rs
Normal file
10
backend/sync_server/src/server/ping.rs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
use axum::Json;
|
||||
|
||||
use crate::{database::models::PingResponse, errors::SyncServerError};
|
||||
|
||||
#[axum::debug_handler]
|
||||
pub async fn ping() -> Result<Json<PingResponse>, SyncServerError> {
|
||||
Ok(Json(PingResponse {
|
||||
server_version: env!("CARGO_PKG_VERSION").to_string(),
|
||||
}))
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue