Skip to content

Commit 7025482

Browse files
committed
remove headerbuilder logging
1 parent 9bb827e commit 7025482

File tree

1 file changed

+40
-40
lines changed

1 file changed

+40
-40
lines changed

src/frontend/src/api/config.tsx

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,11 @@ export function getUserId(): string {
120120
*/
121121
export function headerBuilder(headers?: Record<string, string>): Record<string, string> {
122122
let userId = getUserId();
123-
console.log('headerBuilder: Using user ID:', userId);
123+
//console.log('headerBuilder: Using user ID:', userId);
124124
let defaultHeaders = {
125125
"x-ms-client-principal-id": String(userId) || "", // Custom header
126126
};
127-
console.log('headerBuilder: Created headers:', defaultHeaders);
127+
//console.log('headerBuilder: Created headers:', defaultHeaders);
128128
return {
129129
...defaultHeaders,
130130
...(headers ? headers : {})
@@ -135,46 +135,46 @@ export function headerBuilder(headers?: Record<string, string>): Record<string,
135135
* Initialize team on the backend - takes about 20 seconds
136136
* @returns Promise with team initialization response
137137
*/
138-
export async function initializeTeam(): Promise<{
139-
status: string;
140-
team_id: string;
141-
}> {
142-
const apiUrl = getApiUrl();
143-
if (!apiUrl) {
144-
throw new Error('API URL not configured');
145-
}
146-
147-
const headers = headerBuilder({
148-
'Content-Type': 'application/json',
149-
});
150-
151-
console.log('initializeTeam: Starting team initialization...');
138+
// export async function initializeTeam(): Promise<{
139+
// status: string;
140+
// team_id: string;
141+
// }> {
142+
// const apiUrl = getApiUrl();
143+
// if (!apiUrl) {
144+
// throw new Error('API URL not configured');
145+
// }
146+
147+
// const headers = headerBuilder({
148+
// 'Content-Type': 'application/json',
149+
// });
150+
151+
// console.log('initializeTeam: Starting team initialization...');
152152

153-
try {
154-
const response = await fetch(`${apiUrl}/init_team`, {
155-
method: 'GET',
156-
headers,
157-
});
158-
159-
if (!response.ok) {
160-
const errorText = await response.text();
161-
throw new Error(errorText || `HTTP error! status: ${response.status}`);
162-
}
163-
164-
const data = await response.json();
165-
console.log('initializeTeam: Team initialization completed:', data);
153+
// try {
154+
// const response = await fetch(`${apiUrl}/init_team`, {
155+
// method: 'GET',
156+
// headers,
157+
// });
158+
159+
// if (!response.ok) {
160+
// const errorText = await response.text();
161+
// throw new Error(errorText || `HTTP error! status: ${response.status}`);
162+
// }
163+
164+
// const data = await response.json();
165+
// console.log('initializeTeam: Team initialization completed:', data);
166166

167-
// Validate the expected response format
168-
if (data.status !== 'Request started successfully' || !data.team_id) {
169-
throw new Error('Invalid response format from init_team endpoint');
170-
}
167+
// // Validate the expected response format
168+
// if (data.status !== 'Request started successfully' || !data.team_id) {
169+
// throw new Error('Invalid response format from init_team endpoint');
170+
// }
171171

172-
return data;
173-
} catch (error) {
174-
console.error('initializeTeam: Error initializing team:', error);
175-
throw error;
176-
}
177-
}
172+
// return data;
173+
// } catch (error) {
174+
// console.error('initializeTeam: Error initializing team:', error);
175+
// throw error;
176+
// }
177+
// }
178178

179179
export const toBoolean = (value: any): boolean => {
180180
if (typeof value !== 'string') {
@@ -192,5 +192,5 @@ export default {
192192
config,
193193
USER_ID,
194194
API_URL,
195-
initializeTeam
195+
//initializeTeam
196196
};

0 commit comments

Comments
 (0)