1
0

Added check to only let a user delete his own list

This commit is contained in:
konrad
2018-06-12 18:46:59 +02:00
committed by kolaente
parent be18247682
commit 1bb7187285
4 changed files with 43 additions and 4 deletions

View File

@ -16,7 +16,7 @@ func DeleteListItemByIDtemByID(c echo.Context) error {
return c.JSON(http.StatusBadRequest, models.Message{"Invalid ID."})
}
// Check if the user has the right to delete that list
// Check if the user has the right to delete that list item
user, err := models.GetCurrentUser(c)
if err != nil {
return c.JSON(http.StatusInternalServerError, models.Message{"An error occured."})