|
@ -4,15 +4,15 @@ const semColor = require('../utils/sem-color.js') |
|
|
module.exports = async function (method, project, channel) { |
|
|
module.exports = async function (method, project, channel) { |
|
|
const endpoint = `https://api.nuget.org/v3-flatcontainer/${project}/index.json` |
|
|
const endpoint = `https://api.nuget.org/v3-flatcontainer/${project}/index.json` |
|
|
const { versions } = await axios.get(endpoint).then(res => res.data) |
|
|
const { versions } = await axios.get(endpoint).then(res => res.data) |
|
|
|
|
|
const unknownBadgeData = { |
|
|
|
|
|
subject: 'nuget', |
|
|
|
|
|
status: 'unknown', |
|
|
|
|
|
color: 'grey' |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
switch (method) { |
|
|
switch (method) { |
|
|
case 'v': |
|
|
case 'v': |
|
|
var version = '' |
|
|
let version = '' |
|
|
var unknownBadgeData = { |
|
|
|
|
|
subject: 'nuget', |
|
|
|
|
|
status: 'unknown', |
|
|
|
|
|
color: 'grey' |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
switch (channel) { |
|
|
switch (channel) { |
|
|
case 'latest': |
|
|
case 'latest': |
|
|