Skip to content

Commit 90a120f

Browse files
committed
Removed old code
1 parent 01a05f7 commit 90a120f

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

swagger/swagger.js

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -187,31 +187,6 @@ module.exports = function (RED) {
187187
this.deprecated = n.deprecated;
188188
}
189189
RED.nodes.registerType("swagger-doc", SwaggerDoc);
190-
/*
191-
function sendFile(res, filename) {
192-
// Use the right function depending on Express 3.x/4.x
193-
if (res.sendFile) {
194-
res.sendFile(filename);
195-
} else {
196-
res.sendfile(filename);
197-
}
198-
}
199-
/*
200-
RED.httpAdmin.get('/swagger-ui/*', (req, res) => {
201-
const filename = req.params[0];
202-
const filePath = path.join(swaggerUiDistPath, filename);
203-
sendFile(res, filePath);
204-
});
205-
206-
function sendFile(res, filePath) {
207-
res.sendFile(filePath, (err) => {
208-
if (err) {
209-
console.error('Error sending file:', err);
210-
res.status(500).send('Error sending file.');
211-
}
212-
});
213-
}
214-
*/
215190

216191
// Serve the main Swagger UI HTML file
217192
RED.httpAdmin.get("/swagger-ui/swagger-ui.html", (req, res) => {

0 commit comments

Comments
 (0)