mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-09 21:28:27 +00:00
reload page after org link
This commit is contained in:
@@ -16,7 +16,7 @@ const linkGitAppInstallationWithOrganization = (installationId: string, sessionI
|
|||||||
})
|
})
|
||||||
}).then(async (res) => {
|
}).then(async (res) => {
|
||||||
if (res && res.status === 200) {
|
if (res && res.status === 200) {
|
||||||
return res.json();
|
return true
|
||||||
}
|
}
|
||||||
console.log("Failed to link installation to organization");
|
console.log("Failed to link installation to organization");
|
||||||
return undefined;
|
return undefined;
|
||||||
|
|||||||
@@ -18,7 +18,11 @@ export default function SecretScanning() {
|
|||||||
const linkInstallation = async () => {
|
const linkInstallation = async () => {
|
||||||
if (typeof queryParams.state === "string" && typeof queryParams.installation_id === "string"){
|
if (typeof queryParams.state === "string" && typeof queryParams.installation_id === "string"){
|
||||||
try {
|
try {
|
||||||
await linkGitAppInstallationWithOrganization(queryParams.installation_id as string, queryParams.state as string)
|
const isLinked = await linkGitAppInstallationWithOrganization(queryParams.installation_id as string, queryParams.state as string)
|
||||||
|
if (isLinked){
|
||||||
|
router.reload()
|
||||||
|
}
|
||||||
|
|
||||||
console.log("installation verification complete")
|
console.log("installation verification complete")
|
||||||
}catch (e){
|
}catch (e){
|
||||||
console.log("app installation is stale, start new session", e)
|
console.log("app installation is stale, start new session", e)
|
||||||
|
|||||||
Reference in New Issue
Block a user