kopia lustrzana https://github.com/badgen/badgen.net
Fix crates badge route
rodzic
d9c56d29f7
commit
c90ba89488
|
@ -17,7 +17,7 @@ export const meta: Meta = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const handlers: Handlers = {
|
export const handlers: Handlers = {
|
||||||
'/crates/:topic/:name': handler
|
'/crates/:topic<v|d|dl>/:pkg': handler
|
||||||
}
|
}
|
||||||
|
|
||||||
export default badgenServe(handlers)
|
export default badgenServe(handlers)
|
||||||
|
@ -45,11 +45,5 @@ async function handler ({topic, pkg}: Args) {
|
||||||
status: millify(crate.recent_downloads) + ' latest version',
|
status: millify(crate.recent_downloads) + ' latest version',
|
||||||
color: 'green'
|
color: 'green'
|
||||||
}
|
}
|
||||||
default:
|
|
||||||
return {
|
|
||||||
subject: 'crates',
|
|
||||||
status: 'unknown topic',
|
|
||||||
color: 'grey'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue