fix session token/cookie handling for arbitrary server IPs; fix realtime update distribution via websockets

This commit is contained in:
Lukas F. Hartmann
2018-05-01 17:04:08 +02:00
parent f752ec4219
commit c19f00b316
10 changed files with 34 additions and 16012 deletions

View File

@@ -133,7 +133,7 @@ router.post('/:artifact_id/payload', function(req, res, next) {
var progress_callback = function(progress_msg) {
a.description = progress_msg;
a.save();
redis.sendMessage("update", a, a.toJSON(), req.channelId);
redis.sendMessage("update", a, JSON.stringify(a), req.channelId);
};
stream.on('finish', function() {
@@ -171,6 +171,7 @@ router.put('/:artifact_id', function(req, res, next) {
}}).then(rows => {
db.unpackArtifact(newAttr);
db.Space.update({ updated_at: new Date() }, {where: {_id: req.space._id} });
newAttr._id = a._id;
res.distributeUpdate("Artifact", newAttr);
});
});