Changeset 0.37.15 (#227)
This commit is contained in:
@@ -644,6 +644,15 @@ func (s *ChannelStore) CompleteWorkflow(ctx context.Context, channelID string, f
|
||||
return err
|
||||
}
|
||||
|
||||
func (s *ChannelStore) CancelWorkflow(ctx context.Context, channelID string) error {
|
||||
_, err := DB.ExecContext(ctx, `
|
||||
UPDATE channels
|
||||
SET workflow_status = 'cancelled', ai_mode = 'off', last_activity_at = $1
|
||||
WHERE id = $2 AND type = 'workflow'
|
||||
`, time.Now().UTC(), channelID)
|
||||
return err
|
||||
}
|
||||
|
||||
func (s *ChannelStore) RejectWorkflowToStage(ctx context.Context, channelID string, stage int) error {
|
||||
now := time.Now().UTC()
|
||||
_, err := DB.ExecContext(ctx, `
|
||||
|
||||
Reference in New Issue
Block a user