Fixed the delete button on the shares table of the expenses page

This commit is contained in:
2025-08-12 12:19:19 +01:00
parent a977f98586
commit ceea5344ce
9 changed files with 95 additions and 2 deletions
+8
View File
@@ -10,6 +10,14 @@ import (
"database/sql"
)
const deleteShare = `-- name: DeleteShare :execresult
DELETE FROM "expensesShares" where "ExpShareID" = ?
`
func (q *Queries) DeleteShare(ctx context.Context, expshareid int64) (sql.Result, error) {
return q.db.ExecContext(ctx, deleteShare, expshareid)
}
const getShares = `-- name: GetShares :many
SELECT
shares.ExpShareID, shares.ExpID, shares.UserID, shares.Share, users.UserID, users.UserName, users.UserPass