Dodato go:embed - disk-first logika za statičke fajlove i šablone

This commit is contained in:
2026-06-04 20:14:03 +02:00
parent 4f54ca3470
commit ccc08aee08
15 changed files with 443 additions and 64 deletions
+8
View File
@@ -125,6 +125,14 @@ func (r *sqliteKorisniciRepo) SacuvajTotpTajnu(ctx context.Context, id int64, ta
return nil
}
func (r *sqliteKorisniciRepo) Obrisi(ctx context.Context, id int64) error {
_, err := r.db.ExecContext(ctx, `DELETE FROM korisnici WHERE id = ?`, id)
if err != nil {
return fmt.Errorf("ntech: korisnici.Obrisi: %w", err)
}
return nil
}
func (r *sqliteKorisniciRepo) PostojiIjedan(ctx context.Context) (bool, error) {
var broj int
err := r.db.QueryRowContext(ctx, `SELECT COUNT(*) FROM korisnici`).Scan(&broj)