uhnit testing from vscode
This commit is contained in:
parent
e6f4349621
commit
f33ca22255
10 changed files with 64 additions and 52 deletions
|
|
@ -24,7 +24,7 @@ namespace isnd.Controllers
|
|||
const int maxTake = 100;
|
||||
|
||||
const string defaultSemVer = "2.0.0";
|
||||
private readonly Resource[] _ressources;
|
||||
private readonly Resource[] _resources;
|
||||
private readonly ILogger<PackagesController> _logger;
|
||||
private readonly IDataProtector _protector;
|
||||
|
||||
|
|
@ -48,13 +48,13 @@ namespace isnd.Controllers
|
|||
_dbContext = dbContext;
|
||||
_packageManager = pm;
|
||||
_unleashĈlient = unleashĈlient;
|
||||
_ressources = _packageManager.GetResources(_unleashĈlient).ToArray();
|
||||
_resources = _packageManager.GetResources(_unleashĈlient).ToArray();
|
||||
}
|
||||
|
||||
[HttpGet(_pkgRootPrefix + ApiConfig.Base)]
|
||||
public IActionResult ApiIndex()
|
||||
{
|
||||
return Ok(_ressources);
|
||||
return Ok(new { version = "3.0.0", resources = _resources });
|
||||
}
|
||||
|
||||
// GET /autocomplete?id=isn.protocol&prerelease=true
|
||||
|
|
|
|||
|
|
@ -1,10 +1,17 @@
|
|||
using Newtonsoft.Json;
|
||||
|
||||
namespace isnd.Controllers
|
||||
{
|
||||
public class Resource
|
||||
{
|
||||
public string id {get; set; }
|
||||
public string type {get; set; }
|
||||
public string comment {get; set; }
|
||||
[JsonProperty("@id")]
|
||||
public string Id {get; set; }
|
||||
|
||||
[JsonProperty("@type")]
|
||||
public string Type {get; set; }
|
||||
|
||||
[JsonProperty("comment")]
|
||||
public string Comment {get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue