mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
return 404 for graphIQl page if the features is disabled
This commit is contained in:
@@ -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 {
|
||||
|
||||
+1
-1
@@ -27,4 +27,4 @@ const Page: NextPage = () => {
|
||||
|
||||
export default Page;
|
||||
|
||||
export { base as getServerSideProps } from 'nextjs/getServerSideProps';
|
||||
export { graphIQl as getServerSideProps } from 'nextjs/getServerSideProps';
|
||||
|
||||
Reference in New Issue
Block a user