Skip to content

Commit a804499

Browse files
committed
Update Error Handler
1 parent fdbf49c commit a804499

4 files changed

Lines changed: 165 additions & 187 deletions

File tree

src/api.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ if (process.env.INFLUX_URL && process.env.INFLUX_TOKEN) {
3030
export class GHCRApi {
3131
/**
3232
* GHCR API
33-
* @param {String} packageOwner
34-
* @param {String} packageName
33+
* @param {string} packageOwner
34+
* @param {string} packageName
3535
*/
3636
constructor(packageOwner, packageName) {
3737
if (!packageOwner || !packageName) throw new Error('Invalid Arguments')
@@ -51,7 +51,7 @@ export class GHCRApi {
5151

5252
/**
5353
* Get Image Tags
54-
* @return {Promise<Array>}
54+
* @return {Promise<string[]>}
5555
*/
5656
async getImageTags() {
5757
const url = `${this.packageOwner}/${this.packageName}/tags/list`
@@ -67,7 +67,7 @@ export class GHCRApi {
6767

6868
/**
6969
* Get Image Size
70-
* @return {Promise<Number>}
70+
* @return {Promise<number>}
7171
*/
7272
async getImageSize(tag = 'latest') {
7373
const key = `ghcr/size/${this.packageOwner}/${this.packageName}/${tag}`
@@ -110,7 +110,7 @@ export class GHCRApi {
110110

111111
/**
112112
* Get Image Manifest
113-
* @return {Promise<Object>}
113+
* @return {Promise<object>}
114114
*/
115115
async getManifest(tag = 'latest') {
116116
const url = `${this.packageOwner}/${this.packageName}/manifests/${tag}`
@@ -127,7 +127,7 @@ export class GHCRApi {
127127
/**
128128
* Get VirusTotal Stats for a Release Asset
129129
* @param {import('express').Request} req
130-
* @return {Promise<Object>}
130+
* @return {Promise<object>}
131131
*/
132132
export async function getVTReleaseStats(req) {
133133
const tag = req.params.tag || 'latest'
@@ -166,8 +166,8 @@ export async function getVTReleaseStats(req) {
166166

167167
/**
168168
* Get VT Stats for a File ID/Hash
169-
* @param {String} hash
170-
* @return {Promise<Object>}
169+
* @param {string} hash
170+
* @return {Promise<object>}
171171
*/
172172
export async function getVTStats(hash) {
173173
const key = `/vt/id/${hash}`

0 commit comments

Comments
 (0)