feat: update post edit page
This commit is contained in:
@@ -90,7 +90,7 @@ func (m *postsModel) Update(ctx context.Context, id int64, model *model.Posts) e
|
||||
model.UpdatedAt = time.Now()
|
||||
|
||||
tbl := table.Posts
|
||||
stmt := tbl.UPDATE(tbl.MutableColumns).SET(model).WHERE(tbl.ID.EQ(Int64(id)))
|
||||
stmt := tbl.UPDATE(tbl.MutableColumns).MODEL(model).WHERE(tbl.ID.EQ(Int64(id)))
|
||||
m.log.Infof("sql: %s", stmt.DebugSql())
|
||||
|
||||
_, err := stmt.ExecContext(ctx, db)
|
||||
|
||||
Reference in New Issue
Block a user