Last active
August 29, 2015 14:08
-
-
Save benbahrenburg/6791e858904640190286 to your computer and use it in GitHub Desktop.
Note Table - Delete Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function del(id, user, request) { | |
var table = tables.getTable('notes'); | |
table.where({ | |
id: id, userId : user.userId | |
}).read({ | |
success: delItems | |
}); | |
function delItems(items) { | |
if (items.length > 0) { | |
request.execute(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment