Skip to content

Commit

Permalink
Log search API's response
Browse files Browse the repository at this point in the history
  • Loading branch information
vedantmgoyal9 committed Jan 30, 2024
1 parent 265bbab commit aeb4969
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions api/manifestSearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export default async function handler(req: VercelRequest, res: VercelResponse) {
let data: {}[] = [];
for (const result of results) {
let data_versions: {}[] = [];
result.PackageVersion.forEach((version) => {
for (const version of result.PackageVersion) {
if (version === result.LatestVersion) {
data_versions.push({
PackageVersion: version,
Expand All @@ -156,7 +156,7 @@ export default async function handler(req: VercelRequest, res: VercelResponse) {
PackageVersion: version,
});
}
});
};
data.push({
PackageIdentifier: result.PackageIdentifier,
PackageName: result.PackageName,
Expand All @@ -165,6 +165,7 @@ export default async function handler(req: VercelRequest, res: VercelResponse) {
});
}

console.log(`Data: ${JSON.stringify(data, null, 0)}`);
res.status(200).json({
Data: data,
UnsupportedPackageMatchFields: ["Market"],
Expand Down

0 comments on commit aeb4969

Please sign in to comment.