forked from 77media/video-flow
feat:回调接口修改
This commit is contained in:
parent
8e1901f72c
commit
31bb1b1fe3
@ -56,17 +56,12 @@ export default function TwitterCallbackModal({
|
||||
}
|
||||
|
||||
// 调用 Twitter 授权回调接口
|
||||
const response = await fetch(`${baseUrl}/api/video-share/x/auth/callback`, {
|
||||
const response = await fetch(`${baseUrl}/api/video-share/x/auth/callback?state=${encodeURIComponent(urlParams.state)}&code=${encodeURIComponent(urlParams.code)}`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'Authorization': `Bearer ${localStorage.getItem('token') || ''}`
|
||||
},
|
||||
body: JSON.stringify({
|
||||
user_id: userId,
|
||||
state: urlParams.state,
|
||||
code: urlParams.code,
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
const data = await response.json();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user