updates
Agent Release / build (push) Successful in 44s
Server Deploy / deploy (push) Successful in 1m24s

This commit is contained in:
domrichardson
2026-06-16 10:28:46 +01:00
parent 2166a483ca
commit 4ea7f369f1
9 changed files with 263 additions and 24 deletions
+12 -2
View File
@@ -126,7 +126,11 @@ func generateKey(c *gin.Context) {
id := c.Param("id")
var body struct {
Label string `json:"label"`
Label string `json:"label"`
KeyType string `json:"key_type"`
KeySize int `json:"key_size"`
Passphrase string `json:"passphrase"`
Comment string `json:"comment"`
}
_ = c.ShouldBindJSON(&body)
if body.Label == "" {
@@ -139,7 +143,13 @@ func generateKey(c *gin.Context) {
return
}
cmdID, err := services.DispatchGenerateKey(s.ServerID, body.Label)
cmdID, err := services.DispatchGenerateKey(s.ServerID, services.KeyGenParams{
Label: body.Label,
KeyType: body.KeyType,
KeySize: body.KeySize,
Passphrase: body.Passphrase,
Comment: body.Comment,
})
if err != nil {
c.JSON(http.StatusServiceUnavailable, gin.H{"error": err.Error()})
return