mirror of https://github.com/certd/certd
chore:
parent
2eb0d55f92
commit
a773872cf3
|
@ -15,12 +15,13 @@ export class AppController extends BaseController {
|
||||||
|
|
||||||
@Get('/latest', { summary: Constants.per.authOnly })
|
@Get('/latest', { summary: Constants.per.authOnly })
|
||||||
async latest(): Promise<any> {
|
async latest(): Promise<any> {
|
||||||
const res = await http.request({
|
|
||||||
url: 'https://registry.npmmirror.com/@certd/pipeline',
|
|
||||||
method: 'get',
|
|
||||||
logRes: false,
|
|
||||||
});
|
|
||||||
try {
|
try {
|
||||||
|
const res = await http.request({
|
||||||
|
url: 'https://registry.npmmirror.com/@certd/pipeline',
|
||||||
|
method: 'get',
|
||||||
|
logRes: false,
|
||||||
|
timeout: 5000,
|
||||||
|
});
|
||||||
const latest = res['dist-tags'].latest;
|
const latest = res['dist-tags'].latest;
|
||||||
return this.ok(latest);
|
return this.ok(latest);
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
|
|
Loading…
Reference in New Issue