node.jsstrongloop

StrongLoop: hiding method updateAttributes()


I've managed to take out some of the predefined methods from my rest API using this code which I adapted from the documentation:

var app = require('../app');
var News = app.models.News;

News.create.shared = false;
News.upsert.shared = false;
News.deleteById.shared = false;

However, this same code breaks when I try to hide the updateAttributes() predefined method. Does anyone know how come this is?


Solution

  • You should do:

    News.prototype.updateAttributes.shared = false;