fix: the issue of failing to unbind third-party login (#3595)

#### What type of PR is this?

/kind bug
/area console
/milestone 2.4.x

#### What this PR does / why we need it:

修复解绑三方登录失败的问题,原因是解绑接口是 put 请求,但请求接口时用了 post 请求。

#### Special notes for your reviewer:

测试方式:

1. 安装 OAuth2 插件:https://github.com/halo-sigs/plugin-oauth2/pull/3
2. 配置某个三方的 OAuth 登录。
3. 测试在个人资料中的绑定和解绑三方登录。

#### Does this PR introduce a user-facing change?

```release-note
None
```
pull/3568/head^2
Ryan Wang 2023-03-27 17:36:02 +08:00 committed by GitHub
parent ab4b7c1f0d
commit d194c34848
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ const handleUnbindAuth = (authProvider: ListedAuthProvider) => {
confirmText: t("core.common.buttons.confirm"), confirmText: t("core.common.buttons.confirm"),
cancelText: t("core.common.buttons.cancel"), cancelText: t("core.common.buttons.cancel"),
onConfirm: async () => { onConfirm: async () => {
await axios.post( await axios.put(
`${import.meta.env.VITE_API_URL}${authProvider.unbindingUrl}`, `${import.meta.env.VITE_API_URL}${authProvider.unbindingUrl}`,
{ {
withCredentials: true, withCredentials: true,