Commit ab1ad312 authored by Adam Procter's avatar Adam Procter

positions now updating in pouch and couchdb

Now to add this information when pulling objects from the couch
parent ec3cda24
Pipeline #217 failed with stages
in 1 minute and 12 seconds
......@@ -113,13 +113,11 @@ export default new Vuex.Store({
console.log(payload.id)
var id = payload.id
id.toString()
positions_db.get(id).then(function (charlie) {
positions_db.get(id).then(function (updater) {
positions_db.put({
_id:id,
xpos: payload.xpos,
ypos: payload.ypos
}).then(function(){
updater.xpos = payload.xpos,
updater.ypos = payload.ypos,
positions_db.put(updater).then(function(){
// FIXME this does sync but does it pass the changes we want to capture via VUEX STORE
pouchdb.sync("positions", "https://nn.adamprocter.co.uk/positions");
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment