diff --git a/api/routes/videos.ts b/api/routes/videos.ts index ec088ca92..5804e3045 100644 --- a/api/routes/videos.ts +++ b/api/routes/videos.ts @@ -10,7 +10,7 @@ import { StandardResponse, VideoResponse } from '../lib/types.js'; export default async function router(schema: Schema, config: Config) { const video = new ECSVideo(config); - await schema.get('/video', { + await schema.get('/video/server', { name: 'List Video Servers', group: 'Video', description: 'Let Admins list video servers', @@ -57,7 +57,7 @@ export default async function router(schema: Schema, config: Config) { } }); - await schema.post('/video', { + await schema.post('/video/server', { name: 'Create Server', group: 'Video', description: 'Create a new Media Server', @@ -78,14 +78,14 @@ export default async function router(schema: Schema, config: Config) { memory: Number(item.memory), cpu: Number(item.cpu) } - - return res.json(i); + + return res.json(i); } catch (err) { return Err.respond(err, res); } }); - await schema.get('/video/:serverid', { + await schema.get('/video/server/:serverid', { name: 'Get Server', group: 'Video', description: 'Get all info about a particular video server', @@ -127,7 +127,7 @@ export default async function router(schema: Schema, config: Config) { } }); - await schema.delete('/video/:serverid', { + await schema.delete('/video/server/:serverid', { name: 'Delete Server', group: 'Video', description: 'Shut down an existing video server', diff --git a/api/web/src/App.vue b/api/web/src/App.vue index 8b7788b55..a75751671 100644 --- a/api/web/src/App.vue +++ b/api/web/src/App.vue @@ -35,7 +35,7 @@ target='_blank' rel='noreferrer' > - Docs + Docs @@ -77,7 +77,7 @@ class='d-flex dropdown-item cursor-pointer hover-dark' @click='logout' > - + Logout diff --git a/api/web/src/components/Admin/AdminVideo.vue b/api/web/src/components/Admin/AdminVideo.vue index dee24495e..80393360e 100644 --- a/api/web/src/components/Admin/AdminVideo.vue +++ b/api/web/src/components/Admin/AdminVideo.vue @@ -144,7 +144,7 @@ export default { methods: { fetchDelete: async function() { this.loading = true; - const url = stdurl(`/api/video/${this.$route.params.video}`); + const url = stdurl(`/api/video/server/${this.$route.params.video}`); await std(url, { method: 'DELETE' }); @@ -154,7 +154,7 @@ export default { fetch: async function() { this.loading = true; try { - const url = stdurl(`/api/video/${this.$route.params.video}`); + const url = stdurl(`/api/video/server/${this.$route.params.video}`); this.video = await std(url); } catch (err) { if (err.message === 'Could not find Media Server with that ID') this.$router.push('/admin/video'); diff --git a/api/web/src/components/Admin/AdminVideos.vue b/api/web/src/components/Admin/AdminVideos.vue index 10014e07a..d533f9313 100644 --- a/api/web/src/components/Admin/AdminVideos.vue +++ b/api/web/src/components/Admin/AdminVideos.vue @@ -117,13 +117,13 @@ export default { methods: { fetchList: async function() { this.loading = true; - const url = stdurl('/api/video'); + const url = stdurl('/api/video/server'); this.list = await std(url); this.loading = false; }, createServer: async function() { this.loading = true; - const url = stdurl('/api/video'); + const url = stdurl('/api/video/server'); const server = await std(url, { method: 'POST', body: {}