File tree 1 file changed +0
-25
lines changed
1 file changed +0
-25
lines changed Original file line number Diff line number Diff line change @@ -187,31 +187,6 @@ module.exports = function (RED) {
187
187
this . deprecated = n . deprecated ;
188
188
}
189
189
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
- */
215
190
216
191
// Serve the main Swagger UI HTML file
217
192
RED . httpAdmin . get ( "/swagger-ui/swagger-ui.html" , ( req , res ) => {
You can’t perform that action at this time.
0 commit comments