Commit b53a425d authored by tom's avatar tom

return 404 for graphIQl page if the features is disabled

parent c60ce02a
......@@ -144,6 +144,16 @@ export const apiDocs: GetServerSideProps<Props> = async(context) => {
return base(context);
};
export const graphIQl: GetServerSideProps<Props> = async(context) => {
if (!config.features.graphqlApiDocs.isEnabled) {
return {
notFound: true,
};
}
return base(context);
};
export const csvExport: GetServerSideProps<Props> = async(context) => {
if (!config.features.csvExport.isEnabled) {
return {
......
......@@ -27,4 +27,4 @@ const Page: NextPage = () => {
export default Page;
export { base as getServerSideProps } from 'nextjs/getServerSideProps';
export { graphIQl as getServerSideProps } from 'nextjs/getServerSideProps';
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment