diff --git a/projet/hyperdrive-rest.js b/projet/hyperdrive-rest.js index 376ebcef1451733d02268fe82da3bae6d1b17be5..45b747e165c853cfffc39860b8bd4ba8e8d87116 100644 --- a/projet/hyperdrive-rest.js +++ b/projet/hyperdrive-rest.js @@ -258,7 +258,6 @@ app.get('/change-path*', (req, res) => { (content) => { res.send(content); }); - // res.send(`Request for a change path (${req.params['0']})`) }) app.get('/create-path*', (req, res) => { diff --git a/projet/sql-request.js b/projet/sql-request.js index 133dc8bcdc10db8855039ceb0abddc063599a789..ebcabf28eb775b12624396310a0df7952580e130 100644 --- a/projet/sql-request.js +++ b/projet/sql-request.js @@ -88,13 +88,10 @@ function addUser(login, passwd) { /** -+----------------+-------+-----------+---------+-----------+ -| paths | login | parent | file_id | file_name | -+----------------+-------+-----------+---------+-----------+ -| /a/coucou | a | /a | abnnnnn | deux | -| /a/coucou | a | /a | accb | trois | -| /a/coucou/test | a | /a/coucou | NULL | NULL | -+----------------+-------+-----------+---------+-----------+ + * This function return all the element in a directory + * @param {string} login Login of the user + * @param {string} path Path to show content + * @param {string} callback callback function */ async function changeDirectory(login, path, callback){ q = ` @@ -122,33 +119,8 @@ async function changeDirectory(login, path, callback){ }); } - console.log(content); return callback(content, "Change dir success"); }); - - // return [ - // { - // path: '/a/coucou', - // login: 'a', - // parent: '/a', - // file_id: 'abnnnnn', - // file_name: 'deux' - // }, - // { - // path: '/a/coucou', - // login: 'a', - // parent: '/a', - // file_id: 'accb', - // file_name: 'trois' - // }, - // { - // path: '/a/coucou/test', - // login: 'a', - // parent: '/a/coucou', - // file_id: 'NULL', - // file_name: 'NULL' - // } - // ]; } exports.addUser = addUser;