Delete statuses.json

This commit is contained in:
Aleksandr Statciuk 2022-02-13 12:05:34 +03:00
parent 7d666b5fec
commit 8238e802d8
4 changed files with 1 additions and 41 deletions

View File

@ -34,7 +34,6 @@ api.guides = new API(`${DATA_DIR}/guides.json`)
api.categories = new API(`${DATA_DIR}/categories.json`) api.categories = new API(`${DATA_DIR}/categories.json`)
api.languages = new API(`${DATA_DIR}/languages.json`) api.languages = new API(`${DATA_DIR}/languages.json`)
api.regions = new API(`${DATA_DIR}/regions.json`) api.regions = new API(`${DATA_DIR}/regions.json`)
api.statuses = new API(`${DATA_DIR}/statuses.json`)
api.blocklist = new API(`${DATA_DIR}/blocklist.json`) api.blocklist = new API(`${DATA_DIR}/blocklist.json`)
module.exports = api module.exports = api

View File

@ -1,4 +1,3 @@
* *
!.gitignore !.gitignore
!blocklist.json !blocklist.json
!statuses.json

View File

@ -1,27 +0,0 @@
{
"online": {
"label": "",
"code": "online",
"level": 1
},
"geo_blocked": {
"label": "Geo-blocked",
"code": "geo_blocked",
"level": 2
},
"not_247": {
"label": "Not 24/7",
"code": "not_247",
"level": 3
},
"timeout": {
"label": "Timeout",
"code": "timeout",
"level": 4
},
"offline": {
"label": "Offline",
"code": "offline",
"level": 5
}
}

View File

@ -1,11 +0,0 @@
const statuses = require('../../data/statuses')
module.exports = function ({ title, status = {} }) {
if (title) {
const [_, label] = title.match(/\[(.*)\]/i) || [null, null]
return Object.values(statuses).find(s => s.label === label) || statuses['online']
}
return status
}