Skip to content

Commit

Permalink
WIP path params refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
hide-on-bush-x committed May 6, 2022
1 parent 6e50cd2 commit 5bae275
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "@masa-finance/tools",
"version": "0.1.13",
"version": "0.1.15",
"license": "MIT",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/common/components/auth-provider/auth-provider.tsx
Expand Up @@ -5,7 +5,7 @@ import { Auth } from '../auth/auth';
export function AuthProvider({ children }: Props) {
return (
<Auth0Provider
domain="dev-1m10in4i.us.auth0.com"
domain="auth.masa.finance"
clientId="Xg2CKYKqJTmDPerMPb5iJLARjhHO3qIM"
audience="https://auth.masa.finance"
redirectUri={window.location.origin}
Expand Down
7 changes: 6 additions & 1 deletion src/common/components/rest-method/rest-method.tsx
Expand Up @@ -34,7 +34,12 @@ export const RestMethod = ({
const pathParametersList = name.split(':');
pathParametersList.shift();
pathParametersList.forEach((pathParameter) => {
const pathParameterClean = pathParameter.split('/');
const pathParameterClean = pathParameter.split('?');
//@ts-ignore
customParameterObject[pathParameterClean[0]] = '';
});
pathParametersList.forEach((pathParameter) => {
const pathParameterClean = pathParameter.split('&');
//@ts-ignore
customParameterObject[pathParameterClean[0]] = '';
});
Expand Down
3 changes: 2 additions & 1 deletion src/common/rest/plaid/sync-plaid/index.ts
Expand Up @@ -2,9 +2,10 @@ import { MethodMetadata, Parameter } from '../..';
import { useRestCall } from '../../../helpers/rest-calls';
import { Headers } from '../../../helpers/axios';

const path = 'sync-plaid/:userId/?publicToken=:publicToken';
const path = 'sync-plaid/:userId?publicToken=:publicToken';

export function useMethod({ pathParameters, body }: any) {
console.log(pathParameters);
const { data, error, loading, getData } = useRestCall({
pathParameters,
headers: Headers,
Expand Down

0 comments on commit 5bae275

Please sign in to comment.