chore: tweak variable names

This commit is contained in:
Steven
2023-12-18 20:47:29 +08:00
parent 16fb5faebd
commit d8a0528135
4 changed files with 18 additions and 19 deletions

View File

@@ -313,10 +313,9 @@ func (s *APIV1Service) DeleteUser(c echo.Context) error {
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("ID is not a number: %s", c.Param("id"))).SetInternal(err)
}
userDelete := &store.DeleteUser{
if err := s.Store.DeleteUser(ctx, &store.DeleteUser{
ID: userID,
}
if err := s.Store.DeleteUser(ctx, userDelete); err != nil {
}); err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, "Failed to delete user").SetInternal(err)
}
return c.JSON(http.StatusOK, true)