Add a stats category for static badges (#3168)
Right now they're showing up in "other," though I expect they make up most of that category. https://github.com/badges/shields/issues/966#issuecomment-469851361
This commit is contained in:
committed by
Caleb Cartwright
parent
e159d90516
commit
4f411755da
@@ -6,7 +6,7 @@ const categories = require('../../services/categories')
|
||||
const isRealCategory = Joi.equal(categories.map(({ id }) => id)).required()
|
||||
|
||||
const isValidCategory = Joi.alternatives()
|
||||
.try(isRealCategory, Joi.equal('debug', 'dynamic').required())
|
||||
.try(isRealCategory, Joi.equal('debug', 'dynamic', 'static').required())
|
||||
.required()
|
||||
|
||||
function assertValidCategory(category, message = undefined) {
|
||||
|
||||
@@ -9,7 +9,7 @@ const queryParamSchema = Joi.object({
|
||||
|
||||
module.exports = class QueryStringStaticBadge extends BaseStaticService {
|
||||
static get category() {
|
||||
return 'other'
|
||||
return 'static'
|
||||
}
|
||||
|
||||
static get route() {
|
||||
|
||||
@@ -5,7 +5,7 @@ const { escapeFormat } = require('../../core/badge-urls/path-helpers')
|
||||
|
||||
module.exports = class StaticBadge extends BaseStaticService {
|
||||
static get category() {
|
||||
return 'other'
|
||||
return 'static'
|
||||
}
|
||||
|
||||
static get route() {
|
||||
|
||||
Reference in New Issue
Block a user