diff options
Diffstat (limited to 'app/server/site.js')
| -rw-r--r-- | app/server/site.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/server/site.js b/app/server/site.js index a7ad501..99f1e63 100644 --- a/app/server/site.js +++ b/app/server/site.js @@ -72,10 +72,11 @@ app.post('/api/folder/:id/upload/', api_files.create(data).then( (db_file) => { console.log(db_file) // console.log(req.body) - if (req.body.should_relay === "true" || req.body.generated === "true") { // if this came from an automated command... + // if this came from an automated command... + if (req.body.should_relay === "true" || req.body.generated === "true") { console.log('relaying...') const client = require('./bridge').client - client.emit('api_res', { type: 'create', datatype: 'file', data: db_file }) + client.emit('api_res', { type: 'create', datatype: 'file', data: JSON.stringify(db_file) }) } resolve(db_file) }).catch( (err) => { |
