add via mcp

This commit is contained in:
2026-09-06 00:08:20 +07:00
parent daba1c244d
commit d8197fce73
8 changed files with 27 additions and 12 deletions
+4 -3
View File
@@ -21,15 +21,16 @@ func NewActionsRepo(pool *pgxpool.Pool) *ActionsRepo {
}
}
func (r *ActionsRepo) AddAction(ctx context.Context, teamId int, code string) (int, error) {
func (r *ActionsRepo) AddAction(ctx context.Context, teamId int, code string, viaMCP bool) (int, error) {
id := 0
err := r.pool.QueryRow(
ctx,
`INSERT INTO actions (code, team_id)
VALUES ($1, $2)
`INSERT INTO actions (code, team_id, via_mcp)
VALUES ($1, $2, $3)
RETURNING id`,
code,
teamId,
viaMCP,
).Scan(&id)
if err != nil {