Archived
wikipedia e altro
This commit is contained in:
+4
-1
@@ -68,6 +68,9 @@ low(new FileAsync(__dirname + '/db.json')) // production
|
||||
|
||||
// POST /videotrack
|
||||
app.post('/videotrack', (req, res) => {
|
||||
res.set({
|
||||
'Access-Control-Allow-Origin': '*'
|
||||
});
|
||||
const videos = db.get('videos');
|
||||
const row = videos.getById(req.body.id);
|
||||
if (row.value()) {
|
||||
@@ -82,7 +85,7 @@ low(new FileAsync(__dirname + '/db.json')) // production
|
||||
"timesWatched": 1,
|
||||
"lastWatched": new Date().toISOString(),
|
||||
}
|
||||
videos.push(newRow).last().write().then(output => res.send(output))
|
||||
videos.push(newRow).last().write().then(output => res.send(200,output))
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user