Skip to content

Instantly share code, notes, and snippets.

@considine considine/app.js

Created Aug 24, 2018
What would you like to do?
ACLs in the addTodo method
// addTodo method of the HomeComponent.
// Rest of the code found on the repo:
addTodo() {
if (!this.newTodo || this.newTodo.length === 0) return;
var todo_acl = new Parse.ACL();
todo_acl.setWriteAccess( Parse.User.current(), true);
todo_acl.setPublicReadAccess( true);
var todoParseObject = new Parse.Object("Todo", {
"text": this.newTodo
.then((newTodo) => {
this.todos = [newTodo].concat(this.todos);
this.newTodo = "";
.catch((function (e) {
alert("Error saving todo! " + e.message);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.