fix: patch resource id (#1055)

This commit is contained in:
boojack
2023-02-09 23:20:36 +08:00
committed by GitHub
parent 6ff79c5d5c
commit bec1558488

View File

@ -228,7 +228,7 @@ func (s *Server) registerResourceRoutes(g *echo.Group) {
return echo.NewHTTPError(http.StatusBadRequest, "Malformatted patch resource request").SetInternal(err) return echo.NewHTTPError(http.StatusBadRequest, "Malformatted patch resource request").SetInternal(err)
} }
resource.ID = resourceID resourcePatch.ID = resourceID
resource, err = s.Store.PatchResource(ctx, resourcePatch) resource, err = s.Store.PatchResource(ctx, resourcePatch)
if err != nil { if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, "Failed to patch resource").SetInternal(err) return echo.NewHTTPError(http.StatusInternalServerError, "Failed to patch resource").SetInternal(err)