This commit is contained in:
@ -6,6 +6,7 @@ import (
|
||||
"github.com/alist-org/alist/v3/server/common"
|
||||
"github.com/gin-gonic/gin"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type SSHKeyAddReq struct {
|
||||
@ -30,7 +31,7 @@ func AddMyPublicKey(c *gin.Context) {
|
||||
}
|
||||
key := &model.SSHPublicKey{
|
||||
Title: req.Title,
|
||||
KeyStr: req.Key,
|
||||
KeyStr: strings.TrimSpace(req.Key),
|
||||
UserId: userObj.ID,
|
||||
}
|
||||
err, parsed := op.CreateSSHPublicKey(key)
|
||||
|
Reference in New Issue
Block a user