Skip to content

Commit

Permalink
version 16
Browse files Browse the repository at this point in the history
  • Loading branch information
matiasdodersidedrawer committed Oct 24, 2021
1 parent f24eafb commit e432847
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 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.15",
"version": "0.1.16",
"license": "MIT",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand Down
5 changes: 5 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import * as authservice from './services/auth-service';
import * as networkservice from './services/network-service';


export const createAuthSidedrawerClient = async (client_id: string) => {
return await authservice.createAuthClient(client_id);
};

export const getSidedrawersOwned = async (token: string) => {
return networkservice.getOwned(token);
};

4 changes: 2 additions & 2 deletions src/services/network-service.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import config from '../config.json';
import axios from 'axios';
import { Auth0Client } from '@auth0/auth0-spa-js';
//import { Auth0Client } from '@auth0/auth0-spa-js';


const instance = axios.create({
Expand All @@ -16,7 +16,7 @@ export const getShared = async () => {
return instance.get(`sidedrawer/shared`);
};

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

return instance.get(`sidedrawer/owned`, { headers: { authorization: `Bearer ${token}` } });
};

0 comments on commit e432847

Please sign in to comment.