Explorar o código

Ajout route save/:file et passage get/:file en post

Loquicom %!s(int64=5) %!d(string=hai) anos
pai
achega
c10629ebb3
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      node/src/route.js

+ 5 - 1
node/src/route.js

@@ -131,7 +131,7 @@ app.post('/list', [verbose, verifyAuth, (req, res) => {
     });
 }]);
 
-app.get('/get/:file', [verbose, verifyAuth, (req, res) => {
+app.post('/get/:file', [verbose, verifyAuth, (req, res) => {
     db.getFile(req.body.user, req.params.file).then((file) => {
         // Erreur
         if (file === false) {
@@ -158,6 +158,10 @@ app.get('/get/:file', [verbose, verifyAuth, (req, res) => {
     });
 }]);
 
+app.post('/save/:file', [verbose, verifyAuth, (req, res) => {
+    
+}]);
+
 /*
 app.get('/', function (req, res) {
     res.send('Hello World!');