Add delete endpoint for mureg

This commit is contained in:
Eduardo Lopes 2026-01-22 17:33:34 -03:00
parent 7e9d373d68
commit d2adf76d34
1 changed files with 16 additions and 0 deletions

View File

@ -340,6 +340,22 @@ namespace line_gestao_api.Controllers
return NoContent(); 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) // ✅ POST: /api/mureg/import-excel (mantido)
// ========================================================== // ==========================================================