Skip to content

Commit

Permalink
fix admin token not correct issue
Browse files Browse the repository at this point in the history
  • Loading branch information
fuji246 committed Feb 20, 2023
1 parent 2d9d2ea commit d944bc7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion LomoAgent/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ class AppDelegate: NSObject, NSApplicationDelegate {
setupLogger()
loadCrashLog()
DDLogInfo("LomoAgent version: \(version)")
UserDefaults.standard.set(UUID().uuidString, forKey: PREF_ADMIN_TOKEN)
// NotificationCenter.default.post(name: .NotifyStart, object: self)
}
}
Expand Down
2 changes: 2 additions & 0 deletions LomoAgent/StatusMenuController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,8 @@ class StatusMenuController: NSObject {
let lomodPath = executablePath.path + "/lomod"
DDLogInfo("lomod Path: \(lomodPath)")

UserDefaults.standard.set(UUID().uuidString, forKey: PREF_ADMIN_TOKEN)

if let homeDir = UserDefaults.standard.string(forKey: PREF_HOME_DIR),
let baseDir = getBasePath(),
let logDir = getLogDir(),
Expand Down

0 comments on commit d944bc7

Please sign in to comment.