🐛 Fix date formatting issue on daily signing
This commit is contained in:
parent
a23c51f483
commit
3ce5ef6617
@ -4,9 +4,9 @@
|
||||
<option name="autoReloadType" value="ALL" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="3fefb2c4-b6f9-466b-a523-53352e8d6f95" name="更改" comment=":sparkles: Can get today's daily sign record">
|
||||
<list default="true" id="3fefb2c4-b6f9-466b-a523-53352e8d6f95" name="更改" comment=":bug: Fix auto maintain range missing models">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/pkg/internal/database/migrator.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/internal/database/migrator.go" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/pkg/internal/services/sign.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/internal/services/sign.go" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
@ -153,7 +153,6 @@
|
||||
</option>
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<MESSAGE value=":wastebasket: Clean up code" />
|
||||
<MESSAGE value=":sparkles: Use capital to deal with links" />
|
||||
<MESSAGE value=":bug: Fix internal token audience update isn't fully applied" />
|
||||
<MESSAGE value=":arrow_up: Implement list user relative grpc function" />
|
||||
@ -178,7 +177,8 @@
|
||||
<MESSAGE value=":sparkles: Daily signs" />
|
||||
<MESSAGE value=":bug: Fix daily check issue" />
|
||||
<MESSAGE value=":sparkles: Can get today's daily sign record" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value=":sparkles: Can get today's daily sign record" />
|
||||
<MESSAGE value=":bug: Fix auto maintain range missing models" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value=":bug: Fix auto maintain range missing models" />
|
||||
</component>
|
||||
<component name="VgoProject">
|
||||
<settings-migrated>true</settings-migrated>
|
||||
|
@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
func CheckDailyCanSign(user models.Account) error {
|
||||
probe := time.Now().Format("YYYY-MM-DD")
|
||||
probe := time.Now().Format("2006-01-02")
|
||||
|
||||
var record models.SignRecord
|
||||
if err := database.C.Where("account_id = ? AND created_at::date = ?", user.ID, probe).First(&record).Error; err != nil {
|
||||
@ -24,7 +24,7 @@ func CheckDailyCanSign(user models.Account) error {
|
||||
}
|
||||
|
||||
func GetTodayDailySign(user models.Account) (models.SignRecord, error) {
|
||||
probe := time.Now().Format("YYYY-MM-DD")
|
||||
probe := time.Now().Format("2006-01-02")
|
||||
|
||||
var record models.SignRecord
|
||||
if err := database.C.Where("account_id = ? AND created_at::date = ?", user.ID, probe).First(&record).Error; err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user