cleanup: remove 2,369 lines of dead code
Removed backup files and unused legacy scanner function. All code verified as unreferenced.
This commit is contained in:
@@ -425,6 +425,13 @@ func (h *SetupHandler) GenerateSigningKeys(c *gin.Context) {
|
||||
c.Header("Pragma", "no-cache")
|
||||
c.Header("Expires", "0")
|
||||
|
||||
// Load configuration to check for existing key
|
||||
cfg, err := config.Load() // This will load from .env file
|
||||
if err == nil && cfg.SigningPrivateKey != "" {
|
||||
c.JSON(http.StatusConflict, gin.H{"error": "A signing key is already configured for this server."})
|
||||
return
|
||||
}
|
||||
|
||||
// Generate Ed25519 keypair
|
||||
publicKey, privateKey, err := ed25519.GenerateKey(rand.Reader)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user