tipi-services
Version:
Node.js library to access wrapping REST API of tipi backend services
25 lines (18 loc) • 615 B
JavaScript
const Service = require('../../../Service')
const Endpoints = require('./Endpoints')
class ErrorLogsService extends Service {
constructor (baseUrl) {
super()
this.endpoints = Endpoints(baseUrl)
}
async add (id, data) {
return this.sendRequest({ endpoint: this.endpoints.add, body: data, params: { id } })
}
async details (id) {
return this.sendRequest({ endpoint: this.endpoints.details, params: { id } })
}
async removeAll (id) {
return this.sendRequest({ endpoint: this.endpoints.removeAll, params: { id } })
}
}
module.exports = ErrorLogsService