master
huanghai 5 years ago
parent 3b3dc5a0eb
commit 4eae625b82

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

Loading…
Cancel
Save