@authrocket/authrocket-node
Version:
AuthRocket library for Node
21 lines (15 loc) • 381 B
JavaScript
const Resource = require('./resource')
class Realm extends Resource {
constructor(client) {
super(client)
this.path = 'realms'
this.rootElement = 'realm'
}
reset(id, params={}) {
if (!id)
return this.isBlankError()
const path = `${this.path}/${encodeURI(id)}/reset`
return this.client.post(path, params)
}
}
module.exports = Realm