Improve api schema

This commit is contained in:
Tobias Reisinger 2024-05-04 18:34:26 +02:00
parent f23bb48fa1
commit f9ad8f9399
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
9 changed files with 123 additions and 164 deletions
src/handlers/v1

View file

@ -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"))
}