This commit is contained in:
@@ -577,7 +577,7 @@ export const useTranscriptionStore = create<TranscriptionState>((set, get) => {
|
||||
set({ isExporting: true, exportError: null });
|
||||
|
||||
try {
|
||||
const apiBaseUrl = import.meta.env.VITE_API_BASE || 'https://api.classroomcopilot.ai';
|
||||
const apiBaseUrl = import.meta.env.VITE_API_BASE || '/api';
|
||||
const response = await fetch(`${apiBaseUrl}/transcribe/sessions/${sessionId}/export`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
@@ -627,7 +627,7 @@ export const useTranscriptionStore = create<TranscriptionState>((set, get) => {
|
||||
try {
|
||||
const { _accessToken: token } = get();
|
||||
if (!token) return;
|
||||
const apiBaseUrl = import.meta.env.VITE_API_BASE || 'https://api.classroomcopilot.ai';
|
||||
const apiBaseUrl = import.meta.env.VITE_API_BASE || '/api';
|
||||
const response = await fetch(`${apiBaseUrl}/transcribe/keywords`, {
|
||||
headers: { 'Authorization': `Bearer ${token}` },
|
||||
});
|
||||
@@ -643,7 +643,7 @@ export const useTranscriptionStore = create<TranscriptionState>((set, get) => {
|
||||
try {
|
||||
const { _accessToken: token, _userId: userId } = get();
|
||||
if (!token || !userId) return;
|
||||
const apiBaseUrl = import.meta.env.VITE_API_BASE || 'https://api.classroomcopilot.ai';
|
||||
const apiBaseUrl = import.meta.env.VITE_API_BASE || '/api';
|
||||
const response = await fetch(`${apiBaseUrl}/transcribe/keywords`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
@@ -669,7 +669,7 @@ export const useTranscriptionStore = create<TranscriptionState>((set, get) => {
|
||||
try {
|
||||
const { _accessToken: token } = get();
|
||||
if (!token) return;
|
||||
const apiBaseUrl = import.meta.env.VITE_API_BASE || 'https://api.classroomcopilot.ai';
|
||||
const apiBaseUrl = import.meta.env.VITE_API_BASE || '/api';
|
||||
await fetch(`${apiBaseUrl}/transcribe/keywords/${watchId}`, {
|
||||
method: 'DELETE',
|
||||
headers: { 'Authorization': `Bearer ${token}` },
|
||||
@@ -709,7 +709,7 @@ export const useTranscriptionStore = create<TranscriptionState>((set, get) => {
|
||||
if (activeSession) {
|
||||
try {
|
||||
const { _accessToken: kwToken } = get();
|
||||
const apiBaseUrl = import.meta.env.VITE_API_BASE || 'https://api.classroomcopilot.ai';
|
||||
const apiBaseUrl = import.meta.env.VITE_API_BASE || '/api';
|
||||
await fetch(`${apiBaseUrl}/transcribe/keywords/events`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
|
||||
Reference in New Issue
Block a user