const express = require('express');

const router = express.Router();

//Getting a list of all existing documents
router.get("/", async(req, res) =>{
    try {
        res.status(200).json({documents: []});          //TODO: array full of the documents names
    } catch (e) {
        res.status(404).send("Documents not found");
    }
});

//Getting a specific document
router.get("/:id", async(req, res) => {
    try {
        res.status(200).json({dokument_URL: ""});       //TODO: return the specific document
    } catch (e) {
        res.status(404).send("Document not found");
    }
});

//Deleting a specific document
router.delete("/:id", async(req, res) => {
    try {
        res.status(200).send("Document deleted.");      //TODO: delet the specific document
    } catch (e) {
        res.status(500).send("Error trying to delete a document");
    }
});

module.exports = router;