-
Notifications
You must be signed in to change notification settings - Fork 0
feat(Core Resources): add core resources routes #19
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
base: main
Are you sure you want to change the base?
Conversation
| } | ||
|
|
||
| type StudyMaterialController interface { | ||
| AddStudyMaterial(c echo.Context) error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create a separate route for creating subject
params are subject_code, subject_name, subject_category
controllers/resource_controller.go
Outdated
| AddStudyMaterial(c echo.Context) error | ||
| GetCategoryStudyMaterials(c echo.Context) error | ||
| GetStudyMaterial(c echo.Context) error | ||
| UpdateStudyMaterialSubject(c echo.Context) error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UpdateStudyMaterialSubject is not needed since its a asset_material user can delete and re-upload it.
| type StudyMaterialController interface { | ||
| AddStudyMaterial(c echo.Context) error | ||
| GetCategoryStudyMaterials(c echo.Context) error | ||
| GetStudyMaterial(c echo.Context) error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create a GetAll route
Expected Response:
"response": [
{
"category": "Digital Circuits",
"subjects":[
{
"name": "Basic VLSI Design",
"subject": "VLSI",
"subject_category": "DIGITAL ELECTRONICS",
"SubjectCode": "ECPC13",
"document_url": "http://localhost:8000/static/documents/2023-01-22T12:13:22Z.pdf"
}
]
}
]
| // | ||
| // @Security ApiKeyAuth | ||
| // @Router /v1/studymaterial/add [post] | ||
| func (rc *studyMaterialController) AddStudyMaterial(c echo.Context) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since we will make new route to create a subject
remove subject_name just subject_code is neccessary
Work in progress (Update Study Material Subject)