Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public async create(next, resources, options?) {
if (this.notImplementedMethods.indexOf("create") !== -1) {
throw notImplementedError("create", Object.getPrototypeOf(this).constructor.name);
}
return next(resources, options)
}
public async read(next, query?, options?) {
if (this.notImplementedMethods.indexOf("read") !== -1) {
throw notImplementedError("read", Object.getPrototypeOf(this).constructor.name);
}
return next(query, options)
}
public async replace(next, id, values, options?) {
if (this.notImplementedMethods.indexOf("replace") !== -1) {
throw notImplementedError("replace", Object.getPrototypeOf(this).constructor.name);
}
return next(id, values, options)
}
public async delete(next, query, options?) {
if (this.notImplementedMethods.indexOf("delete") !== -1) {
throw notImplementedError("delete", Object.getPrototypeOf(this).constructor.name);
}
return next(query, options)
}
}
public async patch(next, query, values, options?) {
if (this.notImplementedMethods.indexOf("patch") !== -1) {
throw notImplementedError("patch", Object.getPrototypeOf(this).constructor.name);
}
return next(query, values, options)
}