public async Task <IHttpActionResult> FindPackagesById( ODataQueryOptions <V2FeedPackage> options, [FromODataUri] string id, [FromUri] string semVerLevel = null) { if (string.IsNullOrEmpty(id)) { var semVerLevelKey = SemVerLevelKey.ForSemVerLevel(semVerLevel); var emptyResult = Enumerable.Empty <Package>().AsQueryable() .ToV2FeedPackageQuery( GetSiteRoot(), _configurationService.Features.FriendlyLicenses, semVerLevelKey); return(TrackedQueryResult(options, emptyResult, MaxPageSize, customQuery: false)); } return(await GetCore( options, id, version : null, semVerLevel : semVerLevel, allowHijack : true, return404NotFoundWhenNoResults : false, isNonHijackEnabled : _featureFlagService.IsODataV2FindPackagesByIdNonHijackedEnabled())); }
public async Task <IHttpActionResult> FindPackagesById( ODataQueryOptions <V2FeedPackage> options, [FromODataUri] string id, [FromUri] string semVerLevel = null) { return(await FindPackagesByIdAsync( options, id, semVerLevel, _featureFlagService.IsODataV2FindPackagesByIdNonHijackedEnabled())); }