Modifier le type de contenu de la réponse pour la route /cat et simplifier le gestionnaire en supprimant le paramètre req
This commit is contained in:
@@ -334,14 +334,14 @@ router.post('/videos/render/:video_id', (req, res) => {
|
|||||||
* 200:
|
* 200:
|
||||||
* description: A cat video
|
* description: A cat video
|
||||||
* content:
|
* content:
|
||||||
* video/mp4:
|
* application/octet-stream:
|
||||||
* schema:
|
* schema:
|
||||||
* type: string
|
* type: string
|
||||||
* format: binary
|
* format: binary
|
||||||
* 404:
|
* 404:
|
||||||
* description: Video not found
|
* description: Video not found
|
||||||
*/
|
*/
|
||||||
router.get('/cat', (req, res) => {
|
router.get('/cat', (_, res) => {
|
||||||
const videoPath = dbTester.getCatVideo();
|
const videoPath = dbTester.getCatVideo();
|
||||||
fs.access(videoPath, fs.constants.F_OK, (err) => {
|
fs.access(videoPath, fs.constants.F_OK, (err) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
|||||||
Reference in New Issue
Block a user