♻️ refactor(setting): move API info functions to dedicated module
Move validateApiInfo and getApiInfo functions from controller layer to setting/api_info.go to improve code organization and separation of concerns. Changes: - Create setting/api_info.go with ValidateApiInfo() and GetApiInfo() functions - Remove validateApiInfo function from controller/option.go - Remove getApiInfo function from controller/misc.go - Update function calls to use setting package - Clean up unused imports (net/url, regexp, fmt) in controller/option.go This refactoring aligns the API info configuration management with the existing pattern used by other setting modules (chat.go, group_ratio.go, rate_limit.go, etc.) and improves code reusability and maintainability.
This commit is contained in:
@@ -986,7 +986,7 @@ const Detail = (props) => {
|
||||
<div key={api.id} className="flex p-2 hover:bg-white rounded-lg transition-colors cursor-pointer">
|
||||
<div className="flex-shrink-0 mr-3">
|
||||
<Avatar
|
||||
size="extra-extra-small"
|
||||
size="extra-small"
|
||||
color={api.color}
|
||||
>
|
||||
{api.route.substring(0, 2)}
|
||||
|
||||
Reference in New Issue
Block a user