-
- safeRemove: function(id, uid, cb)
- {
- db.serialize(function() {
- const query =
- "SELECT 1 " +
- "FROM Problems " +
- "WHERE id = " + id + " AND uid = " + uid;
- db.get(query, (err,prob) => {
- if (!prob)
- return cb({errmsg: "Not your problem"});
- ProvlemModel.remove(id);
- cb(null);
- });
- });
- },