@@ -84,7 +84,7 @@ export const mockDocuments = [
8484
8585export const handlers = [
8686 // Auth endpoints
87- http . post ( 'http://localhost:3000 /api/auth/login' , async ( { request } ) => {
87+ http . post ( 'http://localhost:8099 /api/auth/login' , async ( { request } ) => {
8888 const body = await request . json ( ) as { username : string ; password : string }
8989
9090 if ( body . username === 'testuser' && body . password === 'password' ) {
@@ -102,7 +102,7 @@ export const handlers = [
102102 )
103103 } ) ,
104104
105- http . post ( 'http://localhost:3000 /api/auth/register' , async ( { request } ) => {
105+ http . post ( 'http://localhost:8099 /api/auth/register' , async ( { request } ) => {
106106 const body = await request . json ( ) as { username : string ; email : string ; password : string }
107107
108108 if ( body . username === 'existinguser' ) {
@@ -124,11 +124,11 @@ export const handlers = [
124124 } )
125125 } ) ,
126126
127- http . post ( 'http://localhost:3000 /api/auth/logout' , ( ) => {
127+ http . post ( 'http://localhost:8099 /api/auth/logout' , ( ) => {
128128 return HttpResponse . json ( { message : 'Logged out successfully' } )
129129 } ) ,
130130
131- http . get ( 'http://localhost:3000 /api/auth/me' , ( { request } ) => {
131+ http . get ( 'http://localhost:8099 /api/auth/me' , ( { request } ) => {
132132 const auth = checkAuth ( request )
133133 if ( ! auth . authorized ) {
134134 return auth . error
@@ -138,7 +138,7 @@ export const handlers = [
138138 } ) ,
139139
140140 // Document endpoints
141- http . get ( 'http://localhost:3000 /api/documents' , ( { request } ) => {
141+ http . get ( 'http://localhost:8099 /api/documents' , ( { request } ) => {
142142 const auth = checkAuth ( request )
143143 if ( ! auth . authorized ) {
144144 return auth . error
@@ -147,7 +147,7 @@ export const handlers = [
147147 return HttpResponse . json ( { documents : mockDocuments } )
148148 } ) ,
149149
150- http . post ( 'http://localhost:3000 /api/documents/upload' , async ( { request } ) => {
150+ http . post ( 'http://localhost:8099 /api/documents/upload' , async ( { request } ) => {
151151 const auth = checkAuth ( request )
152152 if ( ! auth . authorized ) {
153153 return auth . error
@@ -201,7 +201,7 @@ export const handlers = [
201201 }
202202 } ) ,
203203
204- http . get ( 'http://localhost:3000 /api/documents/:id/content' , ( { params, request } ) => {
204+ http . get ( 'http://localhost:8099 /api/documents/:id/content' , ( { params, request } ) => {
205205 const auth = checkAuth ( request )
206206 if ( ! auth . authorized ) {
207207 return auth . error
@@ -225,7 +225,7 @@ export const handlers = [
225225 } )
226226 } ) ,
227227
228- http . delete ( 'http://localhost:3000 /api/documents/:id' , ( { params, request } ) => {
228+ http . delete ( 'http://localhost:8099 /api/documents/:id' , ( { params, request } ) => {
229229 const auth = checkAuth ( request )
230230 if ( ! auth . authorized ) {
231231 return auth . error
@@ -245,7 +245,7 @@ export const handlers = [
245245 } ) ,
246246
247247 // GenAI endpoints
248- http . post ( 'http://localhost:3000 /api/genai/chat/sessions' , async ( { request } ) => {
248+ http . post ( 'http://localhost:8099 /api/genai/chat/sessions' , async ( { request } ) => {
249249 const auth = checkAuth ( request )
250250 if ( ! auth . authorized ) {
251251 return auth . error
@@ -260,7 +260,7 @@ export const handlers = [
260260 } )
261261 } ) ,
262262
263- http . post ( 'http://localhost:3000 /api/genai/chat/sessions/:sessionId/messages' , async ( { request, params } ) => {
263+ http . post ( 'http://localhost:8099 /api/genai/chat/sessions/:sessionId/messages' , async ( { request, params } ) => {
264264 const auth = checkAuth ( request )
265265 if ( ! auth . authorized ) {
266266 return auth . error
@@ -283,7 +283,7 @@ export const handlers = [
283283 } )
284284 } ) ,
285285
286- http . post ( 'http://localhost:3000 /api/genai/summary' , async ( { request } ) => {
286+ http . post ( 'http://localhost:8099 /api/genai/summary' , async ( { request } ) => {
287287 const auth = checkAuth ( request )
288288 if ( ! auth . authorized ) {
289289 return auth . error
@@ -296,7 +296,7 @@ export const handlers = [
296296 } )
297297 } ) ,
298298
299- http . get ( 'http://localhost:3000 /api/genai/quiz/documents/:documentId' , async ( { request, params } ) => {
299+ http . get ( 'http://localhost:8099 /api/genai/quiz/documents/:documentId' , async ( { request, params } ) => {
300300 const auth = checkAuth ( request )
301301 if ( ! auth . authorized ) {
302302 return auth . error
@@ -325,7 +325,7 @@ export const handlers = [
325325 } )
326326 } ) ,
327327
328- http . get ( 'http://localhost:3000 /api/genai/flashcards/documents/:documentId' , async ( { request, params } ) => {
328+ http . get ( 'http://localhost:8099 /api/genai/flashcards/documents/:documentId' , async ( { request, params } ) => {
329329 const auth = checkAuth ( request )
330330 if ( ! auth . authorized ) {
331331 return auth . error
0 commit comments