Compare commits
2 commits
99d7607294
...
eb56af74e6
Author | SHA1 | Date | |
---|---|---|---|
Mika Bomm | eb56af74e6 | ||
Mika Bomm | 7d3530a281 |
|
@ -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())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)),
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue