Changeset 0.12.0 (#63)
This commit is contained in:
@@ -277,9 +277,10 @@ func (h *AdminHandler) PublicSettings(c *gin.Context) {
|
||||
}
|
||||
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"banner": banner,
|
||||
"branding": branding,
|
||||
"has_admin_prompt": hasAdminPrompt,
|
||||
"banner": banner,
|
||||
"branding": branding,
|
||||
"has_admin_prompt": hasAdminPrompt,
|
||||
"storage_configured": storageConfigured,
|
||||
"policies": gin.H{
|
||||
"allow_registration": policies["allow_registration"],
|
||||
"allow_user_byok": policies["allow_user_byok"],
|
||||
@@ -288,6 +289,22 @@ func (h *AdminHandler) PublicSettings(c *gin.Context) {
|
||||
})
|
||||
}
|
||||
|
||||
// ── Vault Status ────────────────────────────
|
||||
|
||||
func (h *AdminHandler) VaultStatus(c *gin.Context) {
|
||||
hasKey := h.vault != nil && h.vault.HasEnvKey()
|
||||
keyStr := ""
|
||||
if hasKey {
|
||||
keyStr = "set" // non-empty signals to VaultStatus that key is configured
|
||||
}
|
||||
status, err := crypto.VaultStatus(database.DB, keyStr)
|
||||
if err != nil {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"error": "failed to get vault status"})
|
||||
return
|
||||
}
|
||||
c.JSON(http.StatusOK, status)
|
||||
}
|
||||
|
||||
// ── Provider Configs (Global) ───────────────
|
||||
|
||||
func (h *AdminHandler) ListGlobalConfigs(c *gin.Context) {
|
||||
|
||||
Reference in New Issue
Block a user