CreateSubscription(), UpdateSubscription(), GetMessage(), DeleteMessage()

This commit is contained in:
2022-11-19 23:16:54 +01:00
parent 8278c059ad
commit 0d641b727f
19 changed files with 1155 additions and 669 deletions

View File

@@ -1,10 +1,10 @@
package models
import (
scn "blackforestbytes.com/simplecloudnotifier"
"database/sql"
"github.com/blockloop/scan"
"gogs.mikescher.com/BlackForestBytes/goext/langext"
"gogs.mikescher.com/BlackForestBytes/goext/timeext"
"time"
)
@@ -58,7 +58,7 @@ func (u User) QuotaPerDay() int {
}
func (u User) QuotaUsedToday() int {
now := time.Now().In(timeext.TimezoneBerlin).Format("2006-01-02")
now := scn.QuotaDayString()
if u.QuotaUsedDay != nil && *u.QuotaUsedDay == now {
return u.QuotaUsed
} else {