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

Feature/hash check endpoint #95

Merged
merged 10 commits into from
Aug 15, 2024
Merged

Conversation

jose-carlos-sousa
Copy link
Contributor

closes #92
As requested in the issue description, I implemented:

  • GET hashCheck/ endpoint
  • It accepts the data type Form Data as suggested by @tomaspalma
  • Request Body should have pairs key-value of course_unit_id-hash
  • I return in the response body array of pairs course_unit_id-valid

mysql/sql/00_schema_mysql.sql Outdated Show resolved Hide resolved
mysql/sql/00_schema_mysql.sql Outdated Show resolved Hide resolved
django/statistics.sql Outdated Show resolved Hide resolved
mysql/sql/01_data_new.sql Outdated Show resolved Hide resolved
mysql/sql/00_schema_mysql.sql Outdated Show resolved Hide resolved
mysql/sql/00_schema_mysql.sql Outdated Show resolved Hide resolved
@jose-carlos-sousa jose-carlos-sousa force-pushed the feature/hashCheckEndpoint branch 2 times, most recently from d788cff to e5a3299 Compare August 13, 2024 16:53
django/university/tests.py Outdated Show resolved Hide resolved
@jose-carlos-sousa jose-carlos-sousa force-pushed the feature/hashCheckEndpoint branch 2 times, most recently from 7c528a5 to 45dbb7b Compare August 15, 2024 15:39
@@ -9,6 +9,7 @@
path('course_unit/<int:course_unit_id>/', views.course_unit_by_id),
path('class/<int:course_unit_id>/', views.classes),
path('professors/<int:slot>/', views.professor),
path('info/', views.info)
path('info/', views.info),
path('course_unit/validate', views.verify_course_units)
Copy link
Member

@tomaspalma tomaspalma Aug 15, 2024

Choose a reason for hiding this comment

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

You had the name of the url right at the first time 🥲 prior to my suggestion of changing it to course_unit/validate. Meanwhile, the logic changed and the endpoint only returns hashes so maybe it should be course_unit/hash, what do you think? If so, the name of the function in views.py should also be changed to get_course_unit_hashes maybe

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes now that the function of the endpoint changed that name makes more sense, thanks for pointing that out

Copy link
Member

@tomaspalma tomaspalma left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@jose-carlos-sousa jose-carlos-sousa merged commit 4094561 into develop Aug 15, 2024
@thePeras thePeras deleted the feature/hashCheckEndpoint branch August 15, 2024 19:46
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.

Add backend route to verify hash of a course unit
2 participants