compiling state [wip]
This commit is contained in:
@@ -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