mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-04-05 22:17:40 +03:00
25 lines
685 B
JavaScript
25 lines
685 B
JavaScript
import config from "../app/config";
|
|
import {shortUrl} from "../app/utils";
|
|
|
|
// Remember to also update the "disallowedTopics" list!
|
|
|
|
const routes = {
|
|
home: "/",
|
|
pricing: "/pricing",
|
|
login: "/login",
|
|
signup: "/signup",
|
|
resetPassword: "/reset-password",
|
|
app: config.app_root,
|
|
account: "/account",
|
|
settings: "/settings",
|
|
subscription: "/:topic",
|
|
subscriptionExternal: "/:baseUrl/:topic",
|
|
forSubscription: (subscription) => {
|
|
if (subscription.baseUrl !== config.base_url) {
|
|
return `/${shortUrl(subscription.baseUrl)}/${subscription.topic}`;
|
|
}
|
|
return `/${subscription.topic}`;
|
|
}
|
|
};
|
|
|
|
export default routes;
|