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

Update Question Service #6

Closed
wants to merge 5 commits into from

Conversation

KhoonSun47
Copy link

Update README

Copy link

@limcaaarl limcaaarl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link

@samuelim01 samuelim01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, we just need to include the new requirements for D2!

.idea/.gitignore Outdated

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think the JetBrains .idea folder can be excluded with .gitignore?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I will exclude it out.


### Parameters:

- `limit` - The number of questions to be returned (Required)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this endpoint retrieve a single question?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh the description I wrote was a bit misleading. I was thinking we could just have set it by default to 1 for finding a question for a user. Then for values other than 1, I was thinking we could have it just in case there's some other usage for it (eg; retrieval of questions that matches the param for admin to look through). But I guess the randomised nature of this wouldn't really work that well for the example I gave LOL unless there's another boolean flag to indicate if we want random or not.

Copy link

@samuelim01 samuelim01 Sep 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep sounds good, we could have optional parameters topics, difficulty, limit and offset in the get all questions endpoint for table pagination and filtering 😄

### Parameters:

- `limit` - The number of questions to be returned (Required)
- `topics` - The topic of the question (Required)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we allow users to submit multiple topics that they are interested in?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah agreed. This probably will improve user experience in matching too since the user would have a wider range of topics.


- `limit` - The number of questions to be returned (Required)
- `topics` - The topic of the question (Required)
- `languages` - The language of the question (Required)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean that we are going to customize the code template for each question? Personally, I'm not too keen on doing so, and hence I don't think we need this field.

@limcaaarl limcaaarl linked an issue Sep 17, 2024 that may be closed by this pull request
2 tasks
@McNaBry McNaBry added documentation Improvements or additions to documentation priority.Medium labels Sep 18, 2024
@McNaBry McNaBry changed the base branch from init-question to main September 18, 2024 04:52
- questionController.ts: Implemented new get endpoint for retrieving
questions.
- questionModel.ts: Updated `Difficulty` enum to `Hard` enum.
- questionRoutes.ts: Added new routes for handling get requests.
- helper.ts: Added helper function for improved error handling.
@KhoonSun47 KhoonSun47 changed the title Update README.md for Question Service Update Question Service Sep 21, 2024
@KhoonSun47 KhoonSun47 closed this Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation priority.Medium
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Question Service README
4 participants