mirror of
https://gitlab.rlp.net/proj-wise2526-video2document/video2document.git
synced 2026-06-15 18:01:52 +02:00
Created API-Skeleton and some structure.
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
const express = require('express');
|
||||
|
||||
const router = express.Router();
|
||||
|
||||
router.get("/", async(req, res) => {
|
||||
try {
|
||||
res.send("Videos");
|
||||
res.status(200).send("Videos send.");
|
||||
} catch (e) {
|
||||
res.status(500).send("Error trying to get the video files.")
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
router.post("/", async(req, res) =>{
|
||||
try{
|
||||
res.send("videos send");
|
||||
res.status(201).send("Video file uploaded.");
|
||||
}
|
||||
catch(e){
|
||||
res.status(500).send("Error trying to upload video file.");
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
router.get("/{id}", async(req, res) => {
|
||||
try {
|
||||
res.send("Video with id");
|
||||
res.status(200).send("Video details acquired.");
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
module.exports = router;
|
||||
Reference in New Issue
Block a user