Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added documentation for admin index.js #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions app/admin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function index(request, response) {
}

}

//It list all the files available
function listFiles(req, res){
var parent = req.query.parent?req.query.parent:'root';

Expand All @@ -18,7 +18,7 @@ function listFiles(req, res){
res.end(JSON.stringify({files: result.data.files}));
});
}

//It list all the folders available
function listFolders(req, res){
var parent = req.query.parent?req.query.parent:'root';

Expand All @@ -29,7 +29,7 @@ function listFolders(req, res){
res.end(JSON.stringify({folders: result.data.files}));
});
}

//It enables/dosbales permisions fro viewing according to the role
function enableViewPermissions(req, res){
var permissions =
{
Expand All @@ -43,7 +43,7 @@ function enableViewPermissions(req, res){
});
}


// used to create a folder
function createFolder(req, res){
var name = req.query.name;
var parent = req.query.parent?req.query.parent:'root';
Expand All @@ -64,7 +64,7 @@ function createFolder(req, res){
});
}


// used to delete particular file
function deleteFile(req, res){
var id = req.query.id;

Expand All @@ -79,7 +79,7 @@ function deleteFile(req, res){
}
});
}

//displays the list of the contributors
function displayContributors(req,res){
res.render("pages/contributors");
}
Expand Down