- Added a new `setting` package to replace the `constant` package for configuration management, improving code organization and clarity. - Moved various configuration variables such as `ServerAddress`, `PayAddress`, and `SensitiveWords` to the new `setting` package. - Updated references throughout the codebase to use the new `setting` package, ensuring consistent access to configuration values. - Introduced new files for managing chat settings and midjourney settings, enhancing modularity and maintainability of the code.
13 lines
199 B
Go
13 lines
199 B
Go
package service
|
|
|
|
import (
|
|
"one-api/setting"
|
|
)
|
|
|
|
func GetCallbackAddress() string {
|
|
if setting.CustomCallbackAddress == "" {
|
|
return setting.ServerAddress
|
|
}
|
|
return setting.CustomCallbackAddress
|
|
}
|