Skip to content

Commit

Permalink
improve GetMachineID
Browse files Browse the repository at this point in the history
  • Loading branch information
flarco committed Aug 28, 2024
1 parent f3c34f7 commit 740de17
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/store/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ func settings() {
}

func GetMachineID() string {
if Db == nil {
machineID, _ := machineid.ProtectedID("sling")
return machineID
}
s := &Setting{Key: "machine-id"}
Db.First(&s)
return s.Value
Expand Down

0 comments on commit 740de17

Please sign in to comment.