Improve api schema
This commit is contained in:
parent
f23bb48fa1
commit
f9ad8f9399
9 changed files with 123 additions and 164 deletions
src/handlers/v1
|
@ -11,6 +11,7 @@ use sqlx::{Pool, Sqlite};
|
|||
|
||||
use crate::app_state;
|
||||
use crate::app_state::AppState;
|
||||
use crate::handlers::EmgauwaMessage;
|
||||
|
||||
#[get("/relays")]
|
||||
pub async fn index(pool: web::Data<Pool<Sqlite>>) -> Result<HttpResponse, EmgauwaError> {
|
||||
|
@ -181,5 +182,5 @@ pub async fn pulse(
|
|||
})
|
||||
.await??;
|
||||
|
||||
Ok(HttpResponse::Ok().finish()) // TODO add a message?
|
||||
Ok(HttpResponse::Ok().emgauwa_message("pulse sent"))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue