1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2024-11-01 01:21:15 +01:00
ntfy/web/src/components/routes.js

18 lines
488 B
JavaScript
Raw Normal View History

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}`;
}
};
2022-04-08 16:44:35 +02:00
export default routes;