mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
fix: patch resource id (#1055)
This commit is contained in:
@ -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)
|
||||||
|
Reference in New Issue
Block a user