Добавил BLAZORIES.Переписать все на него.
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 37s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 37s
This commit is contained in:
@@ -31,7 +31,7 @@ public class DeviceController : ControllerBase
|
||||
}
|
||||
}
|
||||
|
||||
[HttpGet("GetDevice")]
|
||||
[HttpGet("GetDeviceById")]
|
||||
[ProducesResponseType<DeviceItem>(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
||||
public IActionResult GetById(int id)
|
||||
@@ -45,6 +45,20 @@ public class DeviceController : ControllerBase
|
||||
}
|
||||
}
|
||||
|
||||
[HttpGet("GetDevices")]
|
||||
[ProducesResponseType<DeviceItem>(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
||||
public IActionResult GetAll()
|
||||
{
|
||||
using (var db = new SQLiteService())
|
||||
{
|
||||
var d = db.Devices.ToList();
|
||||
//if (d.Count != 0)
|
||||
return Ok(d);
|
||||
//else return NoContent();
|
||||
}
|
||||
}
|
||||
|
||||
//========================= POST ====================================//
|
||||
[HttpPost("AddDevice")]
|
||||
public IActionResult AddDevice(DeviceItem d)
|
||||
|
||||
Reference in New Issue
Block a user