feat: update AnnunciInsert to set homepage and stato fields to false

This commit is contained in:
Marco Pedone 2025-08-29 16:36:23 +02:00
parent bc92368abc
commit 9c47d57969

View file

@ -21,7 +21,7 @@ func AnnunciGetActive() ([]string, error) {
func AnnunciInsert(annunci typesdefs.AnnunciParsed) error { func AnnunciInsert(annunci typesdefs.AnnunciParsed) error {
//SET ALL WEB TO FALSE //SET ALL WEB TO FALSE
_, err := Db.Dbpool.Exec(Db.Ctx, "UPDATE public.annunci SET web = false") _, err := Db.Dbpool.Exec(Db.Ctx, "UPDATE public.annunci SET web = false, homepage = false, stato='Sospeso'")
if err != nil { if err != nil {
return fmt.Errorf("failed to set all web to false: %w", err) return fmt.Errorf("failed to set all web to false: %w", err)