Release !
This commit is contained in:
@ -4,7 +4,7 @@ using isn.Abstract;
|
||||
using isn.abst;
|
||||
using isnd.Interfaces;
|
||||
using System.Linq;
|
||||
|
||||
using isnd.Entities;
|
||||
|
||||
namespace isnd.Controllers
|
||||
{
|
||||
@ -30,7 +30,7 @@ namespace isnd.Controllers
|
||||
/// API index
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("~" + Constants.ApiVersionPrefix + "/index")]
|
||||
[HttpGet("~" + Constants.ApiVersionPrefix + ApiConfig.Index)]
|
||||
public IActionResult ApiIndex()
|
||||
{
|
||||
return Ok(new ApiIndexViewModel(packageManager.CatalogBaseUrl){ Version = PackageManager.BASE_API_LEVEL, Resources = resources });
|
||||
|
@ -13,6 +13,8 @@ namespace isnd.Controllers
|
||||
// Web get the paquet
|
||||
[HttpGet("~" + Constants.ApiVersionPrefix + ApiConfig.Nuget + "/{id}/{lower}/{idf}-{lowerf}."
|
||||
+ Constants.PaquetFileEstension)]
|
||||
[HttpGet("~" + Constants.ApiVersionPrefix + ApiConfig.Content + "/{id}/{lower}/{idf}-{lowerf}."
|
||||
+ Constants.PaquetFileEstension)]
|
||||
public IActionResult GetPackage(
|
||||
[FromRoute][SafeName][Required] string id,
|
||||
[FromRoute][SafeName][Required] string lower,
|
||||
|
@ -7,7 +7,7 @@ namespace isnd.Controllers
|
||||
{
|
||||
public partial class PackagesController
|
||||
{
|
||||
|
||||
[HttpGet("~" + Constants.ApiVersionPrefix + ApiConfig.Find)]
|
||||
public IActionResult GetVersions(
|
||||
string id,
|
||||
string lower,
|
||||
|
@ -1,44 +0,0 @@
|
||||
using System.Linq;
|
||||
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using isnd.Entities;
|
||||
using isn.abst;
|
||||
using isnd.Data.Catalog;
|
||||
|
||||
namespace isnd.Controllers
|
||||
{
|
||||
|
||||
public partial class PackagesController
|
||||
{
|
||||
// GET {@id}?q={QUERY}&skip={SKIP}&take={TAKE}&prerelease={PRERELEASE}&semVerLevel={SEMVERLEVEL}&packageType={PACKAGETYPE}
|
||||
[HttpGet("~" + Constants.ApiVersionPrefix + ApiConfig.Find)]
|
||||
[HttpPost("~" + Constants.ApiVersionPrefix + ApiConfig.Find)]
|
||||
public async Task<IActionResult> Search(
|
||||
string id,
|
||||
bool prerelease = false,
|
||||
// string packageType = null,
|
||||
string semVerLevel = null,
|
||||
int skip = 0,
|
||||
int take = 25
|
||||
)
|
||||
{
|
||||
id = id.Trim('\'');
|
||||
if (semVerLevel == "2.0.0") prerelease = true;
|
||||
|
||||
//packageManager.SearchCatalogEntriesById(id, semVerLevel, packageType, prerelease);
|
||||
var regs = await packageManager.SearchPackageAsync(
|
||||
|
||||
new PackageRegistrationQuery
|
||||
{
|
||||
Query = id,
|
||||
Prerelease = prerelease,
|
||||
Take = take,
|
||||
Skip = skip
|
||||
}
|
||||
);
|
||||
return Ok(new { totalHits = regs.Count(), data = regs });
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user