blob: a1cf7c1c46455e82ca447156d1b66dfc515177de (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
export default class RouteSubscriber {
private _root: string;
private requestParameters: string[] = [];
constructor(root: string) {
this._root = `/${root}`;
}
add(...parameters: string[]) {
this.requestParameters.push(...parameters);
return this;
}
public get root() {
return this._root;
}
public get build() {
let output = this._root;
if (this.requestParameters.length) {
output = `${output}/:${this.requestParameters.join("/:")}`;
}
return output;
}
}
|