Build fixes: offline-safe fonts, Next.js API route type updates, TS strict errors resolved, MUI import cleanup, chat markdown wrapper, Azure OpenAI typing, caching key + chapter API id types, and misc error-logging typings.

This commit is contained in:
andupetcu
2025-09-22 17:07:31 +03:00
parent c82b3007fd
commit 98c17d69bc
26 changed files with 106 additions and 105 deletions

View File

@@ -28,7 +28,7 @@ export async function verifyToken(token: string) {
console.log('Server: Token verification successful, userId:', payload.userId)
return payload
} catch (error) {
console.log('Server: Token verification failed:', error.message)
console.log('Server: Token verification failed:', (error as any)?.message || error)
throw new Error('Invalid token')
}
}
@@ -54,7 +54,7 @@ export async function getUserFromToken(token: string) {
}
return user
} catch (error) {
console.log('Server: getUserFromToken error:', error.message)
console.log('Server: getUserFromToken error:', (error as any)?.message || error)
return null
}
}
@@ -69,4 +69,4 @@ export function isTokenExpired(token: string): boolean {
} catch (error) {
return true
}
}
}