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

Adds watched schools #46

Merged
merged 6 commits into from
Jun 22, 2023
Merged

Adds watched schools #46

merged 6 commits into from
Jun 22, 2023

Conversation

mattrltrent
Copy link
Member

Changes

  • Adds POST /schools/watch to watch a new school.
  • Adds DELETE /schools/unwatch to unwatch a school.
  • Adds GET /schools/watched to see all of a user's watched schools.
  • Adds a new database migration (4).

Notes

@mattrltrent mattrltrent added the feature Something new! label Jun 16, 2023
@mattrltrent mattrltrent requested a review from hn275 June 16, 2023 12:08
@gitguardian
Copy link

gitguardian bot commented Jun 16, 2023

⚠️ GitGuardian has uncovered 19 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id Secret Commit Filename
6793264 Generic High Entropy Secret c6fa2d3 features/schools/get_schools.http View secret
6793264 Generic High Entropy Secret c6fa2d3 features/schools/get_schools.http View secret
6793264 Generic High Entropy Secret c6fa2d3 features/schools/get_schools.http View secret
6793264 Generic High Entropy Secret c6fa2d3 features/schools/requests.http View secret
6793264 Generic High Entropy Secret c6fa2d3 features/schools/requests.http View secret
6793264 Generic High Entropy Secret c6fa2d3 features/schools/requests.http View secret
6793264 Generic High Entropy Secret c6fa2d3 features/schools/requests.http View secret
6793264 Generic High Entropy Secret e9e5b8a features/schools/requests.http View secret
6793264 Generic High Entropy Secret e9e5b8a features/schools/requests.http View secret
6793264 Generic High Entropy Secret c46a7b1 features/schools/requests.http View secret
6793264 Generic High Entropy Secret 570d26b features/admin/requests.http View secret
6793264 Generic High Entropy Secret 570d26b features/votes/requests.http View secret
6793264 Generic High Entropy Secret 570d26b features/auth/requests.http View secret
6793264 Generic High Entropy Secret 570d26b features/posts/requests.http View secret
6793264 Generic High Entropy Secret 570d26b features/schools/requests.http View secret
7045040 Company Email Password 570d26b features/auth/requests.http View secret
7062930 Bearer Token 570d26b features/posts/requests.http View secret
7062930 Bearer Token 570d26b features/votes/requests.http View secret
7085662 Bearer Token 570d26b features/schools/requests.http View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Our GitHub checks need improvements? Share your feedbacks!

}

// TODO: should this be limited to only N schools? Paginated? Or
// TODO: will this be cached locally so we'd want to get everything?
Copy link
Contributor

Choose a reason for hiding this comment

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

could you create a ticket for this and reference it here?
Otherwise this would be the last time we see these lines of comments and never get to it lol

Copy link
Member Author

Choose a reason for hiding this comment

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

#63 — added

Comment on lines 32 to 38
// create validator
validator := validator.New()

binding := &validation.DefaultBinding{
Validator: validator,
}
if err := binding.Bind(c.Request, &req); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

my previous pr mentioned putting this in a function, will drop a +1 on where this would be beneficial to use that function

Comment on lines 49 to 54
validator := validator.New()

binding := &validation.DefaultBinding{
Validator: validator,
}
if err := binding.Bind(c.Request, &req); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

+1

@mattrltrent mattrltrent merged commit 6fdcfe9 into main Jun 22, 2023
@mattrltrent mattrltrent deleted the watched_schools branch June 22, 2023 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Something new!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update user's watched schools
2 participants