boolean-uk / team-dev-server-ex-2410-team3

0 stars 0 forks source link

Backend: Include the users' specialism field in cohort response body #49

Closed sebgro98 closed 1 month ago

sebgro98 commented 1 month ago

The front-end cohort page needs to access the users'/teachers' specialism field. Thus, the backend which is generating the responses for the cohorts endpoints must include them, for example with the following code in domain/cohort.js:

      include: {
        users: {
          select: {
            id: true,
            role: true,
            email: true,
            specialism: true,
            profile: true
          }
        }
      }
sebgro98 commented 1 month ago

Approved

amos1969 commented 1 month ago

Approved

maaxolofsson commented 1 month ago

I accidentally closed this.