const Parse = require('../test/lib/parseInit').Parse;
const update = async () => {
try {
const obs = new Parse.Object('Obs');
obs.set('objectId', 'yiFMMatsgF');
const query = new Parse.Query('Project');
const list = await query.find();
for (let i = 0; i < list.length; i += 1) {
const project = list[i];
project.set('obs', obs);
await project.save();
}
return Promise.resolve();
} catch (e) {
return Promise.reject(e);
}
}
update().then(() => {
console.log('success');
}).catch((e) => {
console.log('e------' ,e);
})