|
|
@ -820,8 +820,8 @@ func (m *MotionModel) GetByID(ctx context.Context, id int64) (*Motion, error) {
|
|
|
|
func (m *MotionModel) Update(ctx context.Context, id int64, voteType *VoteType, title string, content string, due time.Time) error {
|
|
|
|
func (m *MotionModel) Update(ctx context.Context, id int64, voteType *VoteType, title string, content string, due time.Time) error {
|
|
|
|
_, err := m.DB.ExecContext(
|
|
|
|
_, err := m.DB.ExecContext(
|
|
|
|
ctx,
|
|
|
|
ctx,
|
|
|
|
`UPDATE decisions SET title=?, content=?, votetype=?, due=? WHERE id=?`,
|
|
|
|
`UPDATE decisions SET title=?, content=?, votetype=?, due=?, modified=? WHERE id=?`,
|
|
|
|
title, content, voteType, due.UTC(), id,
|
|
|
|
title, content, voteType, due.UTC(), time.Now().UTC(), id,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
return fmt.Errorf("could not update decision: %w", err)
|
|
|
|
return fmt.Errorf("could not update decision: %w", err)
|
|
|
|