add fix for create test donat(add argss for query sql module

This commit is contained in:
harold 2025-07-10 15:03:15 +05:00
parent 8fec0b850a
commit 5f285dfc91
2 changed files with 3 additions and 2 deletions

View File

@ -40,8 +40,8 @@ func GetMediaUrl(mediaType model.MediaType) string {
}
var CreateDonat = `
INSERT INTO donats (streamer_id, widget_id, text, amount, donat_user, order_id, target_id, status)
VALUES (@streamer_id, @widget_id, @text, @amount, @donat_user, @order_id, @target_id, @status)
INSERT INTO donats (streamer_id, widget_id, text, amount, donat_user, order_id, target_id, status, paid_time, is_test)
VALUES (@streamer_id, @widget_id, @text, @amount, @donat_user, @order_id, @target_id, @status, @paid_time, @is_test);
RETURNING id;
`
var MarkDonatView = `

View File

@ -48,6 +48,7 @@ func (repoDonat *RepoDonat) CreateDonat(
}
if status == "test_donat" {
args["status"] = "pending"
args["is_test"] = true
args["paid_time"] = time.Now().UTC()
}