mirror of
https://github.com/binwiederhier/ntfy.git
synced 2024-08-21 10:43:49 +02:00
18 lines
488 B
JavaScript
18 lines
488 B
JavaScript
import config from "../app/config";
|
|
import {shortUrl} from "../app/utils";
|
|
|
|
const routes = {
|
|
root: config.appRoot,
|
|
settings: "/settings",
|
|
subscription: "/:topic",
|
|
subscriptionExternal: "/:baseUrl/:topic",
|
|
forSubscription: (subscription) => {
|
|
if (subscription.baseUrl !== window.location.origin) {
|
|
return `/${shortUrl(subscription.baseUrl)}/${subscription.topic}`;
|
|
}
|
|
return `/${subscription.topic}`;
|
|
}
|
|
};
|
|
|
|
export default routes;
|