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:
Paul Melnikow
2019-03-05 22:23:20 -05:00
committed by Caleb Cartwright
parent e159d90516
commit 4f411755da
3 changed files with 3 additions and 3 deletions

View File

@@ -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) {

View File

@@ -9,7 +9,7 @@ const queryParamSchema = Joi.object({
module.exports = class QueryStringStaticBadge extends BaseStaticService {
static get category() {
return 'other'
return 'static'
}
static get route() {

View File

@@ -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() {