mirror of
https://github.com/usememos/memos.git
synced 2025-12-18 22:59:24 +08:00
fix: patch resource id (#1055)
This commit is contained in:
parent
6ff79c5d5c
commit
bec1558488
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue