Conversation
| return GetGuardEndpoint(completeEnvGetters, token); | ||
| } | ||
|
|
||
| std::string GetRealtimeEndpoint(const std::vector<EnvGetterFn>& envGetters, const std::string& token) { |
There was a problem hiding this comment.
GetRealtimeEndpoint duplicates GetGuardEndpoint's endpoint-resolution logic. Consolidate the shared logic into one helper parameterized by the environment-variable name.
Details
✨ AI Reasoning
The added function follows the same sequence as the existing endpoint resolver: read an environment variable, return it when configured, and otherwise derive a regional endpoint from the token. A change to endpoint selection would otherwise need to be kept consistent in both functions. Extract the shared resolution logic and pass the environment-variable name as an argument.
🔧 How do I fix it?
Delete extra code. Extract repeated code sequences into reusable functions or methods. Use loops or data structures to eliminate repetitive patterns.
Reply @AikidoSec feedback: [FEEDBACK] to get better review comments in the future.
Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info
No description provided.