This commit is contained in:
2026-06-09 02:12:40 +03:00
parent c2c0c8d1ad
commit cb931df1b8
53 changed files with 15487 additions and 38 deletions
+14
View File
@@ -1,5 +1,6 @@
using Microsoft.AspNetCore.Http.HttpResults;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Strela.Models;
using Strela.Services;
@@ -66,4 +67,17 @@ public class DeviceController : ControllerBase
return Created();
}
}
//========================= DELETE ====================================//
[HttpDelete("DelType")]
public IActionResult DelType(int id)
{
using (var db = new SQLiteService())
{
var deldev = db.DeviceTypes.Where(u => u.Id == id).FirstOrDefault();
db.DeviceTypes.Remove(deldev);
db.SaveChanges();
return Ok();
}
}
}