mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-11 04:47: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[]> => {
|
||||
const swaggerThemePath = path.join(__dirname, 'swaggerTheme.css');
|
||||
const folders = await fs.readdir(__dirname);
|
||||
const css = (await fs.readFile(swaggerThemePath)).toString();
|
||||
const versions = folders.filter((folderName) => folderName.startsWith('v'));
|
||||
const apiRouters: express.Router[] = [];
|
||||
for (const version of versions) {
|
||||
const openApiPath = path.join(__dirname, version, 'openapi.yml');
|
||||
apiRouters.push(createApiRouter(version, openApiPath, __dirname, css));
|
||||
}
|
||||
return apiRouters;
|
||||
// const swaggerThemePath = path.join(__dirname, 'swaggerTheme.css');
|
||||
// const folders = await fs.readdir(__dirname);
|
||||
// const css = (await fs.readFile(swaggerThemePath)).toString();
|
||||
// const versions = folders.filter((folderName) => folderName.startsWith('v'));
|
||||
// const apiRouters: express.Router[] = [];
|
||||
// for (const version of versions) {
|
||||
// const openApiPath = path.join(__dirname, version, 'openapi.yml');
|
||||
// apiRouters.push(createApiRouter(version, openApiPath, __dirname, css));
|
||||
// }
|
||||
// return apiRouters;
|
||||
return [];
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue