mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
add api check uncheck assignment
This commit is contained in:
@@ -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",
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user