generated from VLADIMIR/template
add via mcp
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user