Compare commits

...

2 commits

Author SHA1 Message Date
Mika Bomm eb56af74e6 remove unused imports 2024-10-12 17:22:19 +02:00
Mika Bomm 7d3530a281 remove unused linux import 2024-10-12 17:22:19 +02:00
2 changed files with 6 additions and 10 deletions

View file

@ -1,10 +1,9 @@
use std::os::linux::raw::stat;
use actix_web::{error::ErrorInternalServerError, http::header::ACCEPT, web, HttpResponse, Responder};
use crate::AppState;
use actix_web::{error::ErrorInternalServerError, web, HttpResponse, Responder};
use entity::node_group;
use sea_orm::{ActiveModelTrait, ActiveValue, EntityTrait, IntoActiveModel};
use sea_orm::{ActiveModelTrait, ActiveValue, EntityTrait};
use serde::{Deserialize, Serialize};
use uuid::Uuid;
use crate::AppState;
#[derive(Deserialize)]
pub struct CreateGroupWithoutId {
@ -113,4 +112,4 @@ pub async fn delete_node(
.map_err(ErrorInternalServerError)?;
Ok(HttpResponse::Ok().finish())
}
}

View file

@ -1,5 +1,5 @@
use crate::controller::{node, user};
use actix_web::web::{self, route, service};
use actix_web::web::{self};
pub fn config(cfg: &mut web::ServiceConfig) {
cfg.service(
@ -19,10 +19,7 @@ pub fn config(cfg: &mut web::ServiceConfig) {
.get(node::get_nodes)
.post(node::create_node),
)
.service(
web::resource("/nodes/{id}")
.delete(node::delete_node)
)
.service(web::resource("/nodes/{id}").delete(node::delete_node))
.service(web::resource("/groups").post(node::create_group)),
);
}