Skip to content
Snippets Groups Projects
Commit 13c4bf0d authored by nicolas.paschoud's avatar nicolas.paschoud
Browse files

Starting show shared file

parent 1237b745
No related branches found
No related tags found
No related merge requests found
...@@ -258,7 +258,6 @@ app.get('/change-path*', (req, res) => { ...@@ -258,7 +258,6 @@ app.get('/change-path*', (req, res) => {
(content) => { (content) => {
res.send(content); res.send(content);
}); });
// res.send(`Request for a change path (${req.params['0']})`)
}) })
app.get('/create-path*', (req, res) => { app.get('/create-path*', (req, res) => {
......
...@@ -88,13 +88,10 @@ function addUser(login, passwd) { ...@@ -88,13 +88,10 @@ function addUser(login, passwd) {
/** /**
+----------------+-------+-----------+---------+-----------+ * This function return all the element in a directory
| paths | login | parent | file_id | file_name | * @param {string} login Login of the user
+----------------+-------+-----------+---------+-----------+ * @param {string} path Path to show content
| /a/coucou | a | /a | abnnnnn | deux | * @param {string} callback callback function
| /a/coucou | a | /a | accb | trois |
| /a/coucou/test | a | /a/coucou | NULL | NULL |
+----------------+-------+-----------+---------+-----------+
*/ */
async function changeDirectory(login, path, callback){ async function changeDirectory(login, path, callback){
q = ` q = `
...@@ -122,33 +119,8 @@ async function changeDirectory(login, path, callback){ ...@@ -122,33 +119,8 @@ async function changeDirectory(login, path, callback){
}); });
} }
console.log(content);
return callback(content, "Change dir success"); 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; exports.addUser = addUser;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment