fix: lint errors removed by using satisfies or as for type (#3934)

Co-authored-by: jamesgeorge007 <jamesgeorge998001@gmail.com>
Co-authored-by: amk-dev <akash.k.mohan98@gmail.com>
This commit is contained in:
Anwarul Islam
2024-03-28 20:58:48 +06:00
committed by GitHub
parent 81f1e05a6c
commit 1f7a8edb14
11 changed files with 570 additions and 127 deletions

View File

@@ -307,7 +307,7 @@ const selectOAuth2AuthType = () => {
? existingGrantTypeInfo
: defaultGrantTypeInfo
auth.value = <HoppRESTAuth>{
auth.value = {
...auth.value,
authType: "oauth-2",
addTo: "HEADERS",

View File

@@ -913,14 +913,16 @@ const generateOAuthToken = async () => {
if (
grantTypesInvolvingRedirect.includes(auth.value.grantTypeInfo.grantType)
) {
const authConfig: PersistedOAuthConfig = {
source: props.source,
context: props.isCollectionProperty
? { type: "collection-properties", metadata: {} }
: { type: "request-tab", metadata: {} },
grant_type: auth.value.grantTypeInfo.grantType,
}
persistenceService.setLocalConfig(
"oauth_temp_config",
JSON.stringify(<PersistedOAuthConfig>{
source: props.source,
context: props.isCollectionProperty
? { type: "collection-properties", metadata: {} }
: { type: "request-tab" },
})
JSON.stringify(authConfig)
)
}