fix: publish issues
This commit is contained in:
@@ -66,7 +66,7 @@ func publishCmd(ctx context.Context) error {
|
||||
|
||||
// publish item
|
||||
if err := publish(ctx, msg); err != nil {
|
||||
return errors.Wrap(err, "failed to publish")
|
||||
return errors.Wrapf(err, "failed to publish id: %d", msg.ChannelMessages.ID)
|
||||
}
|
||||
|
||||
_, err := tbl.UPDATE().SET(tbl.Published.SET(Bool(true))).WHERE(tbl.ID.EQ(Int64(msg.ChannelMessages.ID))).ExecContext(ctx, db)
|
||||
@@ -110,6 +110,10 @@ func publish(_ context.Context, msg publishMsg) error {
|
||||
continue
|
||||
}
|
||||
|
||||
if file == "" {
|
||||
continue
|
||||
}
|
||||
|
||||
filepath := filepath.Join(config.C.Output, file)
|
||||
b, err := os.ReadFile(filepath)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user