2018-07-22 14:50:08 -06:00
|
|
|
export interface RouteParams {
|
2018-09-02 02:57:55 -06:00
|
|
|
deviceId: string;
|
|
|
|
programId: string;
|
2018-07-22 14:50:08 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
export const routerRouteParams: RouteParams = {
|
2018-09-02 02:57:55 -06:00
|
|
|
deviceId: ":deviceId",
|
|
|
|
programId: ":programId"
|
2018-07-22 14:50:08 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
export const home = "/";
|
|
|
|
export const messagesTest = "/messagesTest";
|
|
|
|
|
|
|
|
export const login = "/login";
|
|
|
|
export const logout = "/logout";
|
|
|
|
|
|
|
|
export function device(deviceId?: string | number): string {
|
2018-09-02 02:57:55 -06:00
|
|
|
return `/devices/${deviceId || ""}`;
|
2018-07-22 14:50:08 -06:00
|
|
|
}
|
|
|
|
|
2018-09-02 02:57:55 -06:00
|
|
|
export function program(
|
|
|
|
deviceId: string | number,
|
|
|
|
programId?: string | number
|
|
|
|
): string {
|
|
|
|
return `${device(deviceId)}/programs/${programId}`;
|
2018-07-22 14:50:08 -06:00
|
|
|
}
|