Add delete endpoint for mureg
This commit is contained in:
parent
7e9d373d68
commit
d2adf76d34
|
|
@ -340,6 +340,22 @@ namespace line_gestao_api.Controllers
|
|||
return NoContent();
|
||||
}
|
||||
|
||||
// ==========================================================
|
||||
// ✅ DELETE: /api/mureg/{id}
|
||||
// Exclui registro MUREG
|
||||
// ==========================================================
|
||||
[HttpDelete("{id:guid}")]
|
||||
public async Task<IActionResult> Delete(Guid id)
|
||||
{
|
||||
var entity = await _db.MuregLines.FirstOrDefaultAsync(x => x.Id == id);
|
||||
if (entity == null) return NotFound();
|
||||
|
||||
_db.MuregLines.Remove(entity);
|
||||
await _db.SaveChangesAsync();
|
||||
|
||||
return NoContent();
|
||||
}
|
||||
|
||||
// ==========================================================
|
||||
// ✅ POST: /api/mureg/import-excel (mantido)
|
||||
// ==========================================================
|
||||
|
|
|
|||
Loading…
Reference in New Issue