Skip to content

Commit

Permalink
RecordReadmeCopier fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bengarrett committed Sep 30, 2024
1 parent 261b512 commit 0f9be0c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions handler/htmx/artifact.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func RecordReadmeCopier(c echo.Context, dirs command.Dirs) error {
return badRequest(c, err)
}
unid := c.Param("unid")
tmp, err := helper.MkContent(unid + "-copier")
tmp, err := helper.MkContent(unid)
if err != nil {
return badRequest(c, err)
}
Expand All @@ -157,7 +157,9 @@ func RecordReadmeCopier(c echo.Context, dirs command.Dirs) error {
}
if !helper.File(filepath.Join(dirs.Thumbnail, unid+".png")) &&
!helper.File(filepath.Join(dirs.Thumbnail, unid+".webp")) {
return RecordReadmeImager(c, nil, false, dirs)
if err := dirs.TextImager(nil, src, unid, false); err != nil {
return badRequest(c, err)
}
}
c = pageRefresh(c)
return c.String(http.StatusOK,
Expand Down
1 change: 1 addition & 0 deletions handler/routerlock.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ func editor(g *echo.Group, db *sql.DB, logger *zap.SugaredLogger, dir app.Dirs)
Download: dir.Download,
Preview: dir.Preview,
Thumbnail: dir.Thumbnail,
Extra: dir.Extra,
}
readme := g.Group("/readme")
readme.PATCH("/copy/:unid/:path", func(c echo.Context) error {
Expand Down

0 comments on commit 0f9be0c

Please sign in to comment.