|
|
|
@ -791,13 +791,20 @@ func DelClient(context *gin.Context) {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
accessKey := context.PostForm("access_key")
|
|
|
|
|
RedisStorage.OAuth2RedisStorage.DeleteClient(
|
|
|
|
|
err := RedisStorage.OAuth2RedisStorage.DeleteClient(
|
|
|
|
|
&osin.DefaultClient{
|
|
|
|
|
Id: accessKey,
|
|
|
|
|
},
|
|
|
|
|
)
|
|
|
|
|
context.JSON(http.StatusOK, Model.Res{
|
|
|
|
|
Code: http.StatusOK,
|
|
|
|
|
Msg: "删除成功!",
|
|
|
|
|
})
|
|
|
|
|
if err != nil {
|
|
|
|
|
context.JSON(http.StatusOK, Model.Res{
|
|
|
|
|
Code: http.StatusOK,
|
|
|
|
|
Msg: "删除失败!" + err.Error(),
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
context.JSON(http.StatusOK, Model.Res{
|
|
|
|
|
Code: http.StatusOK,
|
|
|
|
|
Msg: "删除成功!",
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|