6.17.2: Навигация закупки и next_show_at для товара
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 1m29s

This commit is contained in:
poignatov
2026-03-15 17:54:23 +03:00
parent 7e0f979ae3
commit 9c915d4675
5 changed files with 9 additions and 8 deletions

View File

@@ -19520,8 +19520,8 @@ func (a *App) createShoppingItemHandler(w http.ResponseWriter, r *http.Request)
var itemID int
err = a.DB.QueryRow(`
INSERT INTO shopping_items (user_id, board_id, author_id, name, description, group_name, volume_base, repetition_period)
VALUES ($1, $2, $3, $4, $5, $6, $7, $8::interval)
INSERT INTO shopping_items (user_id, board_id, author_id, name, description, group_name, volume_base, repetition_period, next_show_at)
VALUES ($1, $2, $3, $4, $5, $6, $7, $8::interval, CURRENT_DATE)
RETURNING id
`, boardOwnerID, boardID, userID, strings.TrimSpace(req.Name), req.Description, req.GroupName, volumeBase, req.RepetitionPeriod).Scan(&itemID)