Skip to content

Commit

Permalink
Merge branch 'feat/auth-methods' into deploy/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
douxc committed Oct 15, 2024
2 parents 0f0326c + 7f9278e commit a05f249
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions web/app/signin/invite-settings/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,16 @@ export default function InviteSettingsPage() {
},
})
if (res.result === 'success') {
localStorage.setItem('console_token', res.data)
localStorage.setItem('console_token', res.data.access_token)
localStorage.setItem('refresh_token', res.data.refresh_token)
setLocaleOnClient(language, false)
router.replace('/apps')
}
}
catch {
recheck()
}
}, [language, name, recheck, setLocaleOnClient, timezone, token, router])
}, [language, name, recheck, setLocaleOnClient, timezone, token, router, t])

if (!checkRes)
return <Loading />
Expand Down
4 changes: 2 additions & 2 deletions web/service/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ export const invitationCheck: Fetcher<CommonResponse & { is_valid: boolean; data
return get<CommonResponse & { is_valid: boolean; data: { workspace_name: string; email: string; workspace_id: string } }>(url, { params })
}

export const activateMember: Fetcher<CommonResponse & { data: string }, { url: string; body: any }> = ({ url, body }) => {
return post<CommonResponse & { data: string }>(url, { body })
export const activateMember: Fetcher<LoginResponse, { url: string; body: any }> = ({ url, body }) => {
return post<LoginResponse>(url, { body })
}

export const fetchModelProviders: Fetcher<{ data: ModelProvider[] }, string> = (url) => {
Expand Down

0 comments on commit a05f249

Please sign in to comment.