Compilation warns
This commit is contained in:
parent
217cc49019
commit
4191513eef
22 changed files with 72 additions and 57 deletions
31
src/isnd/Controllers/Packages/ApiIndex.cs
Normal file
31
src/isnd/Controllers/Packages/ApiIndex.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.DataProtection;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using NuGet.Versioning;
|
||||
using isnd.Data;
|
||||
using isnd.Entities;
|
||||
using Unleash;
|
||||
using isnd.Services;
|
||||
using isnd.ViewModels;
|
||||
using System.Threading.Tasks;
|
||||
using isnd.Interfaces;
|
||||
using isn.Abstract;
|
||||
|
||||
namespace isnd.Controllers
|
||||
{
|
||||
public partial class PackagesController : Controller
|
||||
{
|
||||
[HttpGet(_pkgRootPrefix + ApiConfig.Base)]
|
||||
public IActionResult ApiIndex()
|
||||
{
|
||||
return Ok(new ApiIndexViewModel{ Version = PackageManager.BASE_API_LEVEL, Resources = _resources });
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
using isnd.Services;
|
||||
using isnd.Entities;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace isnd.Controllers
|
||||
|
|
@ -3,7 +3,7 @@ using System.Threading.Tasks;
|
|||
using isnd.Data.Catalog;
|
||||
using isnd.Helpers;
|
||||
using isnd.Services;
|
||||
using isnd.ViewModels;
|
||||
using isnd.Entities;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
|
|
@ -49,12 +49,5 @@ namespace isnd.Controllers
|
|||
_unleashĈlient = unleashĈlient;
|
||||
_resources = _packageManager.GetResources(_unleashĈlient).ToArray();
|
||||
}
|
||||
|
||||
[HttpGet(_pkgRootPrefix + ApiConfig.Base)]
|
||||
public IActionResult ApiIndex()
|
||||
{
|
||||
return Ok(new ApiIndexViewModel{ Version = PackageManager.BASE_API_LEVEL, Resources = _resources });
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using isnd.Helpers;
|
||||
using isnd.Entities;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using isnd.Attributes;
|
||||
namespace isnd.Controllers
|
||||
|
|
@ -2,15 +2,13 @@ using System.ComponentModel.DataAnnotations;
|
|||
using System.IO;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using isnd.Attributes;
|
||||
using isnd.Entities;
|
||||
namespace isnd.Controllers
|
||||
{
|
||||
|
||||
public partial class PackagesController
|
||||
{
|
||||
// TODO GET GET {@id}/{LOWER_ID}/{LOWER_VERSION}/{LOWER_ID}.{LOWER_VERSION}.nupkg
|
||||
// LOWER_ID URL string yes The package ID, lowercase
|
||||
// LOWER_VERSION URL string yes The package version, normalized and lowercased
|
||||
// response 200 : the package
|
||||
// Web get nupkg
|
||||
[HttpGet(_pkgRootPrefix + ApiConfig.Get + "/{id}/{lower}/{idf}-{lowerf}.nupkg")]
|
||||
public IActionResult GetPackage(
|
||||
[FromRoute][SafeName][Required] string id,
|
||||
|
|
@ -30,8 +28,7 @@ namespace isnd.Controllers
|
|||
return File(pkgfi.OpenRead(), "application/zip; charset=binary");
|
||||
}
|
||||
|
||||
// TODO GET {@id}/{LOWER_ID}/{LOWER_VERSION}/{LOWER_ID}.nuspec
|
||||
// response 200 : the nuspec
|
||||
// Web get spec
|
||||
[HttpGet(_pkgRootPrefix + ApiConfig.Get + "/{id}/{lower}/{idf}-{lowerf}.nuspec")]
|
||||
public IActionResult GetNuspec(
|
||||
[FromRoute][SafeName][Required] string id,
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
using NuGet.Versioning;
|
||||
using isnd.Entities;
|
||||
|
||||
namespace isnd.Controllers
|
||||
{
|
||||
|
|
@ -13,6 +13,7 @@ using NuGet.Packaging.Core;
|
|||
using NuGet.Versioning;
|
||||
using isnd.Data;
|
||||
using isnd.Helpers;
|
||||
using isnd.Entities;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using isnd.Data.Catalog;
|
||||
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using isnd.Entities;
|
||||
|
||||
namespace isnd.Controllers
|
||||
{
|
||||
|
|
@ -10,7 +10,7 @@ namespace isnd.Controllers
|
|||
|
||||
public partial class PackagesController
|
||||
{
|
||||
// GET: PackageVersion
|
||||
// Web search
|
||||
public async Task<IActionResult> Index(PackageIndexViewModel model)
|
||||
{
|
||||
var applicationDbContext = _dbContext.Packages.Include(p => p.Versions).Where(
|
||||
Loading…
Add table
Add a link
Reference in a new issue