style: auto format whole project

This commit is contained in:
Ali BARIN
2022-11-05 23:57:33 +01:00
parent e338770e57
commit 475f24f661
199 changed files with 2421 additions and 1839 deletions

View File

@@ -10,15 +10,13 @@ export default async function createAuthData($: IGlobalVariable) {
const searchParams = qs.stringify({
client_id: $.auth.data.consumerKey as string,
redirect_uri: redirectUri,
response_type: 'code'
})
response_type: 'code',
});
await $.auth.set({
url: `${$.auth.data.oauth2Url}/authorize?${searchParams}`,
});
} catch (error) {
throw new Error(
`Error occured while verifying credentials: ${error}`
);
throw new Error(`Error occured while verifying credentials: ${error}`);
}
}

View File

@@ -34,8 +34,8 @@ export default {
{
label: 'sandbox',
value: 'https://test.salesforce.com/services/oauth2',
}
]
},
],
},
{
key: 'consumerKey',
@@ -76,7 +76,7 @@ export default {
properties: [
{
name: 'oauth2Url',
value: '{fields.oauth2Url}'
value: '{fields.oauth2Url}',
},
{
name: 'consumerKey',

View File

@@ -13,10 +13,10 @@ const verifyCredentials = async ($: IGlobalVariable) => {
grant_type: 'authorization_code',
client_id: $.auth.data.consumerKey as string,
client_secret: $.auth.data.consumerSecret as string,
redirect_uri: redirectUri
redirect_uri: redirectUri,
});
const { data } = await $.http.post(
`${$.auth.data.oauth2Url}/token?${searchParams}`,
`${$.auth.data.oauth2Url}/token?${searchParams}`
);
await $.auth.set({