Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include the users' specialism field in cohort response bodies #130

Conversation

maaxolofsson
Copy link

Have now added to include the "specialism" field of the users in the cohort endpoint response bodies. For example GET /cohorts/1 returns:

{
	"status": "success",
	"data": {
		"cohort": {
			"id": 1,
			"name": "Web Development 122222",
			"startDate": "2000-11-01T00:00:00.000Z",
			"endDate": "2001-12-01T00:00:00.000Z",
			"createdAt": "2024-10-31T11:18:59.541Z",
			"updatedAt": "2024-10-31T12:11:29.290Z",
			"users": [
				{
					"id": 1,
					"role": "STUDENT",
					"email": "[email protected]",
					"specialism": "Software Developer",
					"profile": {
						"firstName": "Joe",
						"lastName": "Bloggs",
						"bio": "Hello, world!",
						"githubUsername": ""
					}
				}
			]
		}
	}
}

Note that the "specialism" field is included.

dogezen and others added 30 commits October 21, 2024 06:51
…e for the user. For example the values such as profile.firstName.
…team3 into 9-backend-design-cohort-update-prisma-and-api-spec
…team3 into 32-update-prisma-to-represent-the-api-spec
…team3 into Setting-up-Automated-testing-Backend-25
Updated openapi.yml to include API endpoints for comments
…team3 into 9-backend-design-cohort-update-prisma-and-api-spec
…the-api-spec

updated prisma to work in accordance to the api spec
…ackend-25

Targeting the correct main now
…-prisma-and-api-spec

Update Cohort Prisma model and API spec
Max V Olofsson and others added 29 commits October 30, 2024 16:26
…team3 into 1-api-endpoint-get-get-all-posts
coverage tool should now work. Had to switch from nyc to c8.
…team3 into 33-change-response-data-in-cohort
…team3 into 46-populate-database-with-connecting-cohort-with-user
…ecting-cohort-with-user

Update Prisma seeding to populate database with connecting cohort with user
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants