From e88de810ee2c4701e5e77194d0f8384900b76922 Mon Sep 17 00:00:00 2001 From: Oleksandra Okhotnykova Date: Wed, 28 Aug 2024 18:57:03 +0200 Subject: [PATCH] OV-59: * rename video api path --- backend/src/bundles/videos/video.controller.ts | 6 +++--- shared/src/bundles/videos/enums/videos-api-path.enum.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/src/bundles/videos/video.controller.ts b/backend/src/bundles/videos/video.controller.ts index 4fc4fa5a0..ceb51b8a5 100644 --- a/backend/src/bundles/videos/video.controller.ts +++ b/backend/src/bundles/videos/video.controller.ts @@ -53,7 +53,7 @@ class VideoController extends BaseController { }); this.addRoute({ - path: VideosApiPath.VIDEO, + path: VideosApiPath.ID, method: 'GET', handler: (options) => this.find( @@ -78,7 +78,7 @@ class VideoController extends BaseController { }); this.addRoute({ - path: VideosApiPath.VIDEO, + path: VideosApiPath.ID, method: 'PATCH', validation: { body: updateVideoValidationSchema, @@ -93,7 +93,7 @@ class VideoController extends BaseController { }); this.addRoute({ - path: VideosApiPath.VIDEO, + path: VideosApiPath.ID, method: 'DELETE', handler: (options) => this.delete( diff --git a/shared/src/bundles/videos/enums/videos-api-path.enum.ts b/shared/src/bundles/videos/enums/videos-api-path.enum.ts index 509b941e3..82abbdcfa 100644 --- a/shared/src/bundles/videos/enums/videos-api-path.enum.ts +++ b/shared/src/bundles/videos/enums/videos-api-path.enum.ts @@ -1,6 +1,6 @@ const VideosApiPath = { ROOT: '/', - VIDEO: '/:id', + ID: '/:id', } as const; export { VideosApiPath };