mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-18 04:10:51 +08:00
Default tokenType to an empty string instead of "gemini" in watcher.go and run.go.
This commit is contained in:
@@ -79,7 +79,7 @@ func StartService(cfg *config.Config, configPath string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Determine token type from JSON data, defaulting to "gemini" if not specified.
|
// Determine token type from JSON data, defaulting to "gemini" if not specified.
|
||||||
tokenType := "gemini"
|
tokenType := ""
|
||||||
typeResult := gjson.GetBytes(data, "type")
|
typeResult := gjson.GetBytes(data, "type")
|
||||||
if typeResult.Exists() {
|
if typeResult.Exists() {
|
||||||
tokenType = typeResult.String()
|
tokenType = typeResult.String()
|
||||||
|
|||||||
@@ -335,7 +335,7 @@ func (w *Watcher) createClientFromFile(path string, cfg *config.Config) (interfa
|
|||||||
return nil, nil // Not an error, just nothing to process yet.
|
return nil, nil // Not an error, just nothing to process yet.
|
||||||
}
|
}
|
||||||
|
|
||||||
tokenType := "gemini"
|
tokenType := ""
|
||||||
typeResult := gjson.GetBytes(data, "type")
|
typeResult := gjson.GetBytes(data, "type")
|
||||||
if typeResult.Exists() {
|
if typeResult.Exists() {
|
||||||
tokenType = typeResult.String()
|
tokenType = typeResult.String()
|
||||||
|
|||||||
Reference in New Issue
Block a user