add fix
This commit is contained in:
parent
493ae72055
commit
30cb14d554
@ -220,6 +220,7 @@ func (donatService *ServiceDonat) MarkDonatPaid(
|
|||||||
go func(streamerID, donatID int, duration int) {
|
go func(streamerID, donatID int, duration int) {
|
||||||
select {
|
select {
|
||||||
case <-time.After(time.Duration(duration) * time.Second):
|
case <-time.After(time.Duration(duration) * time.Second):
|
||||||
|
slog.Info("Starting donate auto timeout:", duration)
|
||||||
moderated := true
|
moderated := true
|
||||||
updateModel := model.ModerationDonat{
|
updateModel := model.ModerationDonat{
|
||||||
Accepted: &moderated,
|
Accepted: &moderated,
|
||||||
@ -235,6 +236,7 @@ func (donatService *ServiceDonat) MarkDonatPaid(
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if donateModel.AcceptedTime == nil {
|
if donateModel.AcceptedTime == nil {
|
||||||
|
slog.Info("Enable auto process.")
|
||||||
if err := donatService.donatRepo.ModerateDonation(
|
if err := donatService.donatRepo.ModerateDonation(
|
||||||
bgCtx,
|
bgCtx,
|
||||||
donateModel.ID,
|
donateModel.ID,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user