Commit 59e2c884 by Seefs Committed by GitHub

Merge pull request #1916 from RedwindA/fix/3rd-binding-state

fix: sync third-party binding state in personal settings
parents fa73e274 9e271b06
...@@ -450,6 +450,10 @@ func GetSelf(c *gin.Context) { ...@@ -450,6 +450,10 @@ func GetSelf(c *gin.Context) {
"role": user.Role, "role": user.Role,
"status": user.Status, "status": user.Status,
"email": user.Email, "email": user.Email,
"github_id": user.GitHubId,
"oidc_id": user.OidcId,
"wechat_id": user.WeChatId,
"telegram_id": user.TelegramId,
"group": user.Group, "group": user.Group,
"quota": user.Quota, "quota": user.Quota,
"used_quota": user.UsedQuota, "used_quota": user.UsedQuota,
......
...@@ -26,6 +26,7 @@ import { ...@@ -26,6 +26,7 @@ import {
showInfo, showInfo,
showSuccess, showSuccess,
setStatusData, setStatusData,
setUserData,
} from '../../helpers'; } from '../../helpers';
import { UserContext } from '../../context/User'; import { UserContext } from '../../context/User';
import { Modal } from '@douyinfe/semi-ui'; import { Modal } from '@douyinfe/semi-ui';
...@@ -165,6 +166,7 @@ const PersonalSetting = () => { ...@@ -165,6 +166,7 @@ const PersonalSetting = () => {
const { success, message, data } = res.data; const { success, message, data } = res.data;
if (success) { if (success) {
userDispatch({ type: 'login', payload: data }); userDispatch({ type: 'login', payload: data });
setUserData(data);
} else { } else {
showError(message); showError(message);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment