tipi-services
Version:
Node.js library to access wrapping REST API of tipi backend services
21 lines (15 loc) • 520 B
JavaScript
const Service = require('../../../Service');
const Endpoints = require('./Endpoints')
class StaffSettingsService extends Service {
constructor(baseUrl) {
super()
this.endpoints = Endpoints(baseUrl)
}
async details(id, query) {
return this.sendRequest({endpoint: this.endpoints.details, params: { id }, query })
}
async update(id, data) {
return this.sendRequest({endpoint: this.endpoints.update, body: data, params: { id }})
}
}
module.exports = StaffSettingsService