lbry.tech/app/modules/redirectOr404.js
2018-09-30 22:32:48 -04:00

15 lines
311 B
JavaScript

/*
this is fucking awful
*/
import Page404 from "../views/404.js";
import redirects from "../data/redirects.json";
export default (path) => {
const redirectUrl = redirects[path];
if (redirectUrl) {
throw "fix this please, needs to redirect to:" + redirectUrl;
} else {
return Page404();
}
};