compiling state [wip]

This commit is contained in:
2022-11-23 18:19:17 +01:00
parent f105b2ef2e
commit 3256c7f5fe
16 changed files with 176 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
use actix_web::web;
pub fn views_factory(app: &mut web::ServiceConfig) {
// auth::auth_factory(app);
// to_do::item_factory(app);
// app::app_factory(app);
// users::user_factory(app);
}
+16
View File
@@ -0,0 +1,16 @@
pub struct Path {
pub prefix: String,
pub backend: bool,
}
impl Path {
pub fn define(&self, following_path: String) -> String {
match self.backend {
true => {
let path: String = self.prefix.to_owned() + &following_path;
return String::from("/api/v1") + &path;
}
false => self.prefix.to_owned() + &following_path,
}
}
}