Skip to content

Commit

Permalink
feat: update
Browse files Browse the repository at this point in the history
  • Loading branch information
snaildarter committed Mar 31, 2024
1 parent dd98ed7 commit 0db6139
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ export const health = (): Promise<HealthRes | any> => {
*/
export const auth = (apiKey: string): Promise<AuthRes | any> => {
return axios.post(Path.Auth, { apiKey: apiKey }).then(res => {
//@ts-ignore
if (res && res?.token && res?.expire) {
//@ts-ignore
axios.defaults.headers.common['Authorization'] = 'Bearer ' + res?.token;
}
return res;
Expand Down

0 comments on commit 0db6139

Please sign in to comment.