Skip to content

Instantly share code, notes, and snippets.



Created Aug 20, 2017
What would you like to do?
app.get('/log', function(request, response) {
// Tìm những log trong database có userId trùng với id trong cookie
// Sắp xếp theo thứ tự thời gian
db.log.find({ userId: }).sort( {time: -1} , (err, docs) => {
response.json({ id: userId, logs: docs });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment