@@ -111,16 +111,6 @@ module.exports = class BaseService {
|
||||
throw new Error(`Route not defined for ${this.name}`)
|
||||
}
|
||||
|
||||
static get _cacheLength() {
|
||||
const cacheLengths = {
|
||||
build: 30,
|
||||
license: 3600,
|
||||
version: 300,
|
||||
debug: 60,
|
||||
}
|
||||
return cacheLengths[this.category]
|
||||
}
|
||||
|
||||
/**
|
||||
* Example URLs for this service. These should use the format
|
||||
* specified in `route`, and can be used to demonstrate how to use badges for
|
||||
@@ -153,6 +143,16 @@ module.exports = class BaseService {
|
||||
return []
|
||||
}
|
||||
|
||||
static get _cacheLength() {
|
||||
const cacheLengths = {
|
||||
build: 30,
|
||||
license: 3600,
|
||||
version: 300,
|
||||
debug: 60,
|
||||
}
|
||||
return cacheLengths[this.category]
|
||||
}
|
||||
|
||||
/**
|
||||
* Default data for the badge. Can include label, logo, and color. These
|
||||
* defaults are used if the value is neither included in the service data
|
||||
@@ -162,6 +162,10 @@ module.exports = class BaseService {
|
||||
return {}
|
||||
}
|
||||
|
||||
static render(props) {
|
||||
throw new Error(`render() function not implemented for ${this.name}`)
|
||||
}
|
||||
|
||||
static validateDefinition() {
|
||||
assertValidCategory(this.category, `Category for ${this.name}`)
|
||||
|
||||
@@ -209,10 +213,6 @@ module.exports = class BaseService {
|
||||
return result
|
||||
}
|
||||
|
||||
static render(props) {
|
||||
throw new Error(`render() function not implemented for ${this.name}`)
|
||||
}
|
||||
|
||||
constructor({ sendAndCacheRequest }, { handleInternalErrors }) {
|
||||
this._requestFetcher = sendAndCacheRequest
|
||||
this._handleInternalErrors = handleInternalErrors
|
||||
|
||||
Reference in New Issue
Block a user