🐛 Fix random panic
This commit is contained in:
parent
50498976af
commit
77c543f88e
8
.idea/workspace.xml
generated
8
.idea/workspace.xml
generated
@ -4,9 +4,9 @@
|
|||||||
<option name="autoReloadType" value="ALL" />
|
<option name="autoReloadType" value="ALL" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="3fefb2c4-b6f9-466b-a523-53352e8d6f95" name="更改" comment=":loud_sound: Verbose logging at receive broadcasting event">
|
<list default="true" id="3fefb2c4-b6f9-466b-a523-53352e8d6f95" name="更改" comment=":bug: Bug fix directory service wasn't registered">
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/pkg/internal/grpc/server.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/internal/grpc/server.go" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/pkg/internal/services/check_in.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/internal/services/check_in.go" afterDir="false" />
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
@ -159,7 +159,6 @@
|
|||||||
</component>
|
</component>
|
||||||
<component name="VcsManagerConfiguration">
|
<component name="VcsManagerConfiguration">
|
||||||
<option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="false" />
|
<option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="false" />
|
||||||
<MESSAGE value=":boom: Remove deprecated subscription API" />
|
|
||||||
<MESSAGE value=":loud_sound: Verbose notifying logging" />
|
<MESSAGE value=":loud_sound: Verbose notifying logging" />
|
||||||
<MESSAGE value=":loud_sound: Verbose notifying check logging" />
|
<MESSAGE value=":loud_sound: Verbose notifying check logging" />
|
||||||
<MESSAGE value=":bug: Fix notifiable is empty when user do not set" />
|
<MESSAGE value=":bug: Fix notifiable is empty when user do not set" />
|
||||||
@ -184,7 +183,8 @@
|
|||||||
<MESSAGE value=":bug: Fix check user exists in realm bug" />
|
<MESSAGE value=":bug: Fix check user exists in realm bug" />
|
||||||
<MESSAGE value=":loud_sound: Verbose logging at setting last seen at" />
|
<MESSAGE value=":loud_sound: Verbose logging at setting last seen at" />
|
||||||
<MESSAGE value=":loud_sound: Verbose logging at receive broadcasting event" />
|
<MESSAGE value=":loud_sound: Verbose logging at receive broadcasting event" />
|
||||||
<option name="LAST_COMMIT_MESSAGE" value=":loud_sound: Verbose logging at receive broadcasting event" />
|
<MESSAGE value=":bug: Bug fix directory service wasn't registered" />
|
||||||
|
<option name="LAST_COMMIT_MESSAGE" value=":bug: Bug fix directory service wasn't registered" />
|
||||||
<option name="GROUP_MULTIFILE_MERGE_BY_DIRECTORY" value="true" />
|
<option name="GROUP_MULTIFILE_MERGE_BY_DIRECTORY" value="true" />
|
||||||
</component>
|
</component>
|
||||||
<component name="VgoProject">
|
<component name="VgoProject">
|
||||||
|
@ -41,7 +41,7 @@ func CheckIn(user models.Account) (models.CheckInRecord, error) {
|
|||||||
expMin := 100
|
expMin := 100
|
||||||
record := models.CheckInRecord{
|
record := models.CheckInRecord{
|
||||||
ResultTier: tier,
|
ResultTier: tier,
|
||||||
ResultExperience: rand.Intn(expMax-expMin) + expMin,
|
ResultExperience: rand.Intn(expMax+1-expMin) + expMin,
|
||||||
AccountID: user.ID,
|
AccountID: user.ID,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user