Skip to content

Conversation

@rspk2207
Copy link

Work in progress (Update Study Material Subject)

@Muhesh7 Muhesh7 changed the title Study materials feat(Core Resources): add core resources routes Jan 20, 2023
}

type StudyMaterialController interface {
AddStudyMaterial(c echo.Context) error
Copy link
Member

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

AddStudyMaterial(c echo.Context) error
GetCategoryStudyMaterials(c echo.Context) error
GetStudyMaterial(c echo.Context) error
UpdateStudyMaterialSubject(c echo.Context) error
Copy link
Member

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
Copy link
Member

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 {
Copy link
Member

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

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.

3 participants