Added ability to modify file metadata

This commit is contained in:
Isaac Abadi
2022-06-17 15:34:12 -04:00
parent 53a181e04d
commit 9cf8b87c6e
12 changed files with 264 additions and 77 deletions

View File

@@ -950,6 +950,24 @@ app.post('/api/getAllFiles', optionalJwt, async function (req, res) {
});
});
app.post('/api/updateFile', optionalJwt, async function (req, res) {
const uid = req.body.uid;
const change_obj = req.body.change_obj;
const file = await db_api.updateRecord('files', {uid: uid}, change_obj);
if (!file) {
res.send({
success: false,
error: 'File could not be found'
});
} else {
res.send({
success: true
});
}
});
app.post('/api/checkConcurrentStream', async (req, res) => {
const uid = req.body.uid;