add api check uncheck assignment

This commit is contained in:
MacBook Air M1
2026-01-06 23:59:16 +07:00
parent 3bd0602525
commit dded9e807b
4 changed files with 78 additions and 0 deletions
@@ -241,3 +241,21 @@ func (u *DailyChecklistController) GetAllTasks(c *fiber.Ctx) error {
Data: result,
})
}
func (u *DailyChecklistController) UpdateAssignment(c *fiber.Ctx) error {
req := new(validation.UpdateAssignment)
if err := c.BodyParser(req); err != nil {
return fiber.NewError(fiber.StatusBadRequest, "Invalid request body")
}
if err := u.DailyChecklistService.UpdateAssignment(c, req); err != nil {
return err
}
return c.Status(fiber.StatusOK).
JSON(response.Success{
Code: fiber.StatusOK,
Status: "success",
Message: "Assignment updated successfully",
})
}