mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-03 04:50:52 +08:00
refactor: standardize constant naming and improve file-based auth handling
- Renamed constants from uppercase to CamelCase for consistency. - Replaced redundant file-based auth handling logic with the new `util.CountAuthFiles` helper. - Fixed various error-handling inconsistencies and enhanced robustness in file operations. - Streamlined auth client reload logic in server and watcher components. - Applied minor code readability improvements across multiple packages.
This commit is contained in:
@@ -795,7 +795,7 @@ func authLastRefreshTimestamp(a *Auth) (time.Time, bool) {
|
||||
func lookupMetadataTime(meta map[string]any, keys ...string) (time.Time, bool) {
|
||||
for _, key := range keys {
|
||||
if val, ok := meta[key]; ok {
|
||||
if ts, ok := parseTimeValue(val); ok {
|
||||
if ts, ok1 := parseTimeValue(val); ok1 {
|
||||
return ts, true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user