compiling state [wip]
This commit is contained in:
@@ -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);
|
||||
}
|
||||
@@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user