Supprimer la documentation Swagger obsolète dans plusieurs fichiers de routes
This commit is contained in:
@@ -7,22 +7,6 @@ const dbTester = require('../test/tester');
|
||||
const db = require('../db');
|
||||
const serverError = require('../utils/serverError');
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /smile:
|
||||
* get:
|
||||
* summary: Retrieve a smile image
|
||||
* responses:
|
||||
* 200:
|
||||
* description: A smile image
|
||||
* content:
|
||||
* image/jpeg:
|
||||
* schema:
|
||||
* type: string
|
||||
* format: binary
|
||||
* 404:
|
||||
* description: Image not found
|
||||
*/
|
||||
router.get('/smile', (req, res) => {
|
||||
const imagePath = dbTester.getSmileImage();
|
||||
fs.access(imagePath, fs.constants.F_OK, (err) => {
|
||||
@@ -34,35 +18,6 @@ router.get('/smile', (req, res) => {
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /images/{projectId}/{orderId}:
|
||||
* get:
|
||||
* summary: Retrieve an image by project and order ID
|
||||
* parameters:
|
||||
* - in: path
|
||||
* name: projectId
|
||||
* required: true
|
||||
* schema:
|
||||
* type: string
|
||||
* description: The project ID
|
||||
* - in: path
|
||||
* name: orderId
|
||||
* required: true
|
||||
* schema:
|
||||
* type: string
|
||||
* description: The order ID
|
||||
* responses:
|
||||
* 200:
|
||||
* description: An image file
|
||||
* content:
|
||||
* application/octet-stream:
|
||||
* schema:
|
||||
* type: string
|
||||
* format: binary
|
||||
* 404:
|
||||
* description: Image not found
|
||||
*/
|
||||
router.get('/images/:projectId/:orderId', (req, res) => {
|
||||
const projectId = req.params.projectId;
|
||||
const orderId = req.params.orderId;
|
||||
@@ -86,29 +41,6 @@ router.get('/images/:projectId/:orderId', (req, res) => {
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /images/{measurementId}:
|
||||
* get:
|
||||
* summary: Retrieve an image by measurement ID
|
||||
* parameters:
|
||||
* - in: path
|
||||
* name: measurementId
|
||||
* required: true
|
||||
* schema:
|
||||
* type: string
|
||||
* description: The measurement ID
|
||||
* responses:
|
||||
* 200:
|
||||
* description: An image file
|
||||
* content:
|
||||
* application/octet-stream:
|
||||
* schema:
|
||||
* type: string
|
||||
* format: binary
|
||||
* 404:
|
||||
* description: Image not found
|
||||
*/
|
||||
router.get('/images/:measurementId', (req, res) => {
|
||||
const measurementId = req.params.measurementId;
|
||||
const query = 'SELECT path FROM public.measurements WHERE id = $1';
|
||||
@@ -130,37 +62,6 @@ router.get('/images/:measurementId', (req, res) => {
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /preview/{projectId}/{orderId}:
|
||||
* get:
|
||||
* summary: Retrieve a preview of an image by project and order ID
|
||||
* parameters:
|
||||
* - in: path
|
||||
* name: projectId
|
||||
* required: true
|
||||
* schema:
|
||||
* type: string
|
||||
* description: The project ID
|
||||
* - in: path
|
||||
* name: orderId
|
||||
* required: true
|
||||
* schema:
|
||||
* type: string
|
||||
* description: The order ID
|
||||
* responses:
|
||||
* 200:
|
||||
* description: A resized preview of the image
|
||||
* content:
|
||||
* image/jpeg:
|
||||
* schema:
|
||||
* type: string
|
||||
* format: binary
|
||||
* 404:
|
||||
* description: Image not found
|
||||
* 500:
|
||||
* description: Internal Server Error
|
||||
*/
|
||||
router.get('/preview/:projectId/:orderId', async (req, res) => {
|
||||
const projectId = req.params.projectId;
|
||||
const orderId = req.params.orderId;
|
||||
|
||||
Reference in New Issue
Block a user