feat: introducing server configurations in admin dashboard (#3628)

Co-authored-by: jamesgeorge007 <jamesgeorge998001@gmail.com>
This commit is contained in:
Joel Jacob Stephen
2023-12-13 22:34:59 +05:30
committed by GitHub
parent a8cc569786
commit f3edd001d7
22 changed files with 1007 additions and 29 deletions

View File

@@ -227,4 +227,9 @@ export const auth = {
window.location.href = import.meta.env.VITE_ADMIN_URL;
}
},
getAllowedAuthProviders: async () => {
const res = await authQuery.getProviders();
return res.data?.providers;
},
};

View File

@@ -0,0 +1,3 @@
mutation EnableAndDisableSSO($providerInfo: [EnableAndDisableSSOArgs!]!) {
enableAndDisableSSO(providerInfo: $providerInfo)
}

View File

@@ -0,0 +1,3 @@
mutation ResetInfraConfigs {
resetInfraConfigs
}

View File

@@ -0,0 +1,6 @@
mutation UpdateInfraConfigs($infraConfigs: [InfraConfigArgs!]!) {
updateInfraConfigs(infraConfigs: $infraConfigs) {
name
value
}
}

View File

@@ -0,0 +1,3 @@
query AllowedAuthProviders {
allowedAuthProviders
}

View File

@@ -0,0 +1,6 @@
query InfraConfigs($configNames: [InfraConfigEnum!]!) {
infraConfigs(configNames: $configNames) {
name
value
}
}

View File

@@ -16,6 +16,7 @@ export default {
}),
refreshToken: () => restApi.get('/auth/refresh'),
elevateUser: () => restApi.get('/auth/verify/admin'),
getProviders: () => restApi.get('/auth/providers'),
sendMagicLink: (email: string) =>
restApi.post('/auth/signin?origin=admin', {
email,