lbry.tech/app/modules/redirectOr404.js

16 lines
311 B
JavaScript
Raw Normal View History

2018-10-01 04:32:48 +02:00
/*
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();
}
2018-10-01 01:43:35 +02:00
};