diff --git a/code/AmIVulnerable/AmIVulnerable/Controllers/DbController.cs b/code/AmIVulnerable/AmIVulnerable/Controllers/DbController.cs
index e34d8c6..055f91f 100644
--- a/code/AmIVulnerable/AmIVulnerable/Controllers/DbController.cs
+++ b/code/AmIVulnerable/AmIVulnerable/Controllers/DbController.cs
@@ -198,13 +198,14 @@ public IActionResult GetFullTextCve([FromQuery] string? cve_number) {
/// Ok with result. NoContent if empty.
[HttpGet]
[Route("checkSinglePackage")]
- public IActionResult CheckSinglePackage([FromBody] PackageForApi packageName) {
+ public IActionResult CheckSinglePackage([FromQuery] string PackageName,
+ [FromQuery] string? PackageVersion) {
if (!(this.Request.Headers.Accept.Equals("application/json") || this.Request.Headers.Accept.Equals("*/*"))) {
return StatusCode(406);
}
- using (Operation.Time($"Complete Time for Query-SingleSearch after Package \"{packageName}\"")) {
+ using (Operation.Time($"Complete Time for Query-SingleSearch after Package \"{PackageName}\"")) {
List results = [];
- DataTable dtResult = SearchInMySql(packageName.PackageName);
+ DataTable dtResult = SearchInMySql(PackageName);
// convert the result
foreach (DataRow x in dtResult.Rows) {
CveResult y = new CveResult() {
@@ -240,7 +241,8 @@ public IActionResult CheckSinglePackage([FromBody] PackageForApi packageName) {
}
///
- /// Search for a list of packages
+ /// Search for a list of packages.
+ /// Not useable in swagger because of body - but curl works fine.
///
/// List of tuple: package, version
/// OK, if exists. OK, if no package list searched. NoContent if not found.