mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-11 12:57:29 -08:00
disable public api
This commit is contained in:
parent
ae02d60c03
commit
886e5164fb
|
@ -58,14 +58,15 @@ function createApiRouter(
|
||||||
}
|
}
|
||||||
|
|
||||||
export const loadPublicApiVersions = async (): Promise<express.Router[]> => {
|
export const loadPublicApiVersions = async (): Promise<express.Router[]> => {
|
||||||
const swaggerThemePath = path.join(__dirname, 'swaggerTheme.css');
|
// const swaggerThemePath = path.join(__dirname, 'swaggerTheme.css');
|
||||||
const folders = await fs.readdir(__dirname);
|
// const folders = await fs.readdir(__dirname);
|
||||||
const css = (await fs.readFile(swaggerThemePath)).toString();
|
// const css = (await fs.readFile(swaggerThemePath)).toString();
|
||||||
const versions = folders.filter((folderName) => folderName.startsWith('v'));
|
// const versions = folders.filter((folderName) => folderName.startsWith('v'));
|
||||||
const apiRouters: express.Router[] = [];
|
// const apiRouters: express.Router[] = [];
|
||||||
for (const version of versions) {
|
// for (const version of versions) {
|
||||||
const openApiPath = path.join(__dirname, version, 'openapi.yml');
|
// const openApiPath = path.join(__dirname, version, 'openapi.yml');
|
||||||
apiRouters.push(createApiRouter(version, openApiPath, __dirname, css));
|
// apiRouters.push(createApiRouter(version, openApiPath, __dirname, css));
|
||||||
}
|
// }
|
||||||
return apiRouters;
|
// return apiRouters;
|
||||||
|
return [];
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue