feat: add grammar check functionality and enhance quiz schema
- Introduced a new 'testCheckGrammar' field in DocumentSchema to facilitate grammar checking for documents, leveraging the document service for processing. - Updated DocumentService to implement grammar checking logic, including caching results and publishing suggestions. - Enhanced QuizSchema by adding filter arguments for quiz attempts, allowing for more flexible data retrieval based on user and quiz IDs. - Cleaned up whitespace and improved error handling in quiz attempt creation to ensure better user feedback. These changes improve the document editing experience and enhance the quiz feature's data handling capabilities.
This commit is contained in:
@@ -266,7 +266,6 @@ export class ScheduleSchema extends PothosSchema {
|
||||
if (!ctx.http?.me?.id) {
|
||||
throw new Error('User not found')
|
||||
}
|
||||
Logger.log(`ctx.http.me.role: ${ctx.http.me.role}`)
|
||||
// use case 1: customer query schedules where customer is participant
|
||||
if (ctx.http.me.role === Role.CUSTOMER) {
|
||||
const schedules = await this.prisma.schedule.findMany({
|
||||
|
||||
Reference in New Issue
Block a user