|
@@ -1,4 +1,4 @@
|
|
|
-import axios from 'axios';
|
|
|
+import axiosInstance from '../interceptor';
|
|
|
|
|
|
export interface View {
|
|
|
internal_id: string;
|
|
@@ -43,19 +43,7 @@ export const fetchViews = async (
|
|
|
is_enabled: boolean,
|
|
|
procedure_id: string | null | undefined
|
|
|
): Promise<FetchViewsResponse> => {
|
|
|
- const response = await axios.get('/dr/api/v1/auth/protocol/view', {
|
|
|
- //todo get header info
|
|
|
- // authorization: string,
|
|
|
- // language: 'en' | 'zh',
|
|
|
- // product: 'DROS' | 'VETDROS',
|
|
|
- // source: 'Electron' | 'Browser' | 'Android'
|
|
|
- headers: {
|
|
|
- Authorization:
|
|
|
- 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NTEyNzc5NzAsImlkIjoxLCJuYW1lIjoiYWRtaW4ifQ.ooTGwBXaNhtunbKbpqteWbjDwJLjnRmSIl80r5dp1pY',
|
|
|
- Language: 'en',
|
|
|
- Product: 'DROS',
|
|
|
- Source: 'Electron',
|
|
|
- },
|
|
|
+ const response = await axiosInstance.get('/auth/protocol/view', {
|
|
|
params: {
|
|
|
patient_type,
|
|
|
body_part,
|