Move request models
This commit is contained in:
parent
b3228ea6b5
commit
2a82cf79c4
7 changed files with 48 additions and 32 deletions
emgauwa-core/src/handlers/v1
|
@ -2,15 +2,9 @@ use actix_web::{delete, get, put, web, HttpResponse};
|
|||
use emgauwa_lib::db::DbController;
|
||||
use emgauwa_lib::errors::{DatabaseError, EmgauwaError};
|
||||
use emgauwa_lib::models::{convert_db_list, Controller, FromDbModel};
|
||||
use emgauwa_lib::types::ControllerUid;
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use emgauwa_lib::types::{ControllerUid, RequestController};
|
||||
use sqlx::{Pool, Sqlite};
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct RequestController {
|
||||
name: String,
|
||||
}
|
||||
|
||||
#[get("/api/v1/controllers")]
|
||||
pub async fn index(pool: web::Data<Pool<Sqlite>>) -> Result<HttpResponse, EmgauwaError> {
|
||||
let mut pool_conn = pool.acquire().await?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue