Skip to content

Commit

Permalink
version 17
Browse files Browse the repository at this point in the history
  • Loading branch information
matiasdodersidedrawer committed Oct 25, 2021
1 parent e432847 commit a99642e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "sidedrawer-javascript-sdk",
"author": "Juan Matias Doder",
"description": "This is a sdk of SideDrawer to help to build development quickly.",
"version": "0.1.16",
"version": "0.1.17",
"license": "MIT",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand Down
7 changes: 4 additions & 3 deletions src/config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"apiRecord": "https://records-api.sidedrawer.com/api/v1/",
"apiNetwork": "https://networks-api.sidedrawer.com/api/v1/",
"apiUser": "https://user-api.sidedrawer.com/api/v1/",

"apiRecord": "https://records-api-dev.sidedrawerdev.com/api/v1/",
"apiNetwork": "https://networks-api-dev.sidedrawerdev.com/api/v1/",
"apiUser": "https://user-api-dev.sidedrawerdev.com/api/v1/",
"apiIdentifier": "https://user-api-stg.sidedrawer.com",
"auth0Domain": "acc-stg.sidedrawer.com"
}
3 changes: 3 additions & 0 deletions src/services/auth-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ export const createAuthClient = async (client_id: string) => {
return await createAuth0Client({
domain: config.auth0Domain,
client_id: client_id,
scope: 'openid profile offline_access',
audience: 'https://user-api-stg.sidedrawer.com',
useRefreshTokens: true

});
};
Expand Down
5 changes: 3 additions & 2 deletions src/services/network-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export const getShared = async () => {
};

export const getOwned = async (token: string) => {

return instance.get(`sidedrawer/owned`, { headers: { authorization: `Bearer ${token}` } });
console.log(`Bearer nuevo ${token}`);
instance.defaults.headers.common['Authorization'] = `Bearer ${token}`;
return instance.get(`sidedrawer/owned`);
};

0 comments on commit a99642e

Please sign in to comment.