Expose Google client ID via API config and use dynamically

This commit is contained in:
Tim
2025-07-15 19:25:47 +08:00
parent 1e465a575c
commit 76c2771b7b
3 changed files with 28 additions and 5 deletions

View File

@@ -31,6 +31,9 @@ public class ConfigController {
@Value("${app.ai.format-limit:3}")
private int aiFormatLimit;
@Value("${google.client-id:}")
private String googleClientId;
private final RegisterModeService registerModeService;
@GetMapping("/config")
@@ -43,6 +46,7 @@ public class ConfigController {
resp.setCommentCaptchaEnabled(commentCaptchaEnabled);
resp.setAiFormatLimit(aiFormatLimit);
resp.setRegisterMode(registerModeService.getRegisterMode());
resp.setGoogleClientId(googleClientId);
return resp;
}
@@ -55,5 +59,6 @@ public class ConfigController {
private boolean commentCaptchaEnabled;
private int aiFormatLimit;
private RegisterMode registerMode;
private String googleClientId;
}
}