mirror of
https://github.com/veops/oneterm.git
synced 2025-10-18 13:20:49 +08:00
fix: publickey
This commit is contained in:
@@ -27,7 +27,7 @@ func (c *Controller) PostConfig(ctx *gin.Context) {
|
||||
}
|
||||
|
||||
cfg := &model.Config{}
|
||||
if err := ctx.BindJSON(cfg); err != nil {
|
||||
if err := ctx.ShouldBindBodyWithJSON(cfg); err != nil {
|
||||
ctx.AbortWithError(http.StatusBadRequest, &ApiError{Code: ErrInvalidArgument, Data: map[string]any{"err": err}})
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user