Skip to content

Commit

Permalink
Use of @profcomff/api-uilib
Browse files Browse the repository at this point in the history
  • Loading branch information
dyakovri committed Jul 25, 2024
1 parent 5d10a43 commit 79624d5
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/main_commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

- uses: pnpm/action-setup@v2
with:
version: 7.26.3
version: 9.6.0

- uses: actions/setup-node@v3
with:
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"check": "vue-tsc && pnpm run lint && pnpm run prettier && pnpm run stylelint"
},
"dependencies": {
"@profcomff/api-uilib": "^2024.07.25",
"axios": "^1.7.2",
"markdown-it": "^14.1.0",
"pinia": "^2.1.7",
Expand Down
22 changes: 22 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions src/api/BaseApi.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import axios, { AxiosResponse } from 'axios';
import queryString from 'query-string';
import { createClient } from '@profcomff/api-uilib';

const apiClient = createClient(import.meta.env.VITE_API_URL);
export default apiClient;

export interface DefaultResponse {
status: string;
Expand Down
2 changes: 2 additions & 0 deletions src/store/profile.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { setupAuth } from '@profcomff/api-uilib';
import { scopename } from './../models/ScopeName';
import { marketingApi } from '@/api/marketing';
import { LocalStorage, LocalStorageItem } from '@/models/LocalStorage';
Expand All @@ -18,6 +19,7 @@ export const useProfileStore = defineStore('profile', () => {

function updateToken(newToken?: string) {
token.value = newToken ?? LocalStorage.get(LocalStorageItem.Token);
setupAuth(token.value);
}

function hasTokenAccess(scopeName: string) {
Expand Down

0 comments on commit 79624d5

Please sign in to comment.