Skip to content

Commit

Permalink
fix: fix query to use packagepushrequest
Browse files Browse the repository at this point in the history
  • Loading branch information
btrn11 committed Dec 12, 2024
1 parent 409f619 commit 44bd733
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/package/packagePushUpgrade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,12 @@ export function constructWhere(options?: PackagePushRequestListQueryOptions): st
const where: string[] = [];

if (options?.packageId) {
where.push(`Id = '${options.packageId}'`);
where.push(`MetadataPackageVersion.MetadataPackageId = '${options.packageId}'`);
}

// filter on errors
if (options?.status) {
where.push(`Status = '${options.status.toLowerCase()}'`);
}

return where.length > 0 ? `WHERE ${where.join(' AND ')}` : '';
}

function getQuery(): string {
const QUERY = 'SELECT Id, Package2VersionId, Status, IsMigration' + 'FROM PackagePushRequest ' + '%s'; // WHERE, if applicable
const QUERY = 'SELECT Id, PackageVersion, Status' + 'FROM PackagePushRequest ' + '%s'; // WHERE, if applicable
return QUERY;
}

0 comments on commit 44bd733

Please sign in to comment.