This request includes adding validations when adding, modifying and deleting an educational program EducationalPrograms. It includes the modification of the source codes to execute data validation.
Changes
Controller Changed EducationalProgramsController to handle HTTP requests to create, read, update, and delete educational programs.
ServiceEducationalProgramsService was modified to perform some of the validations specified in the DTOs.
DTOs 'CreateEducationalProgramsDto' and 'UpdateEducationalProgramsDto' were modified to establish validation of the data we expect to insert into the database.
Documentation: Some code-level documentation, such as JSDoc or dosctrings.
Details
Educational Program Controller
create():Handles POST requests to create new educational programs.
findAll(): Handles GET requests to retrieve all educational programs.
findOne(): Handles GET requests to retrieve educational programs by ID.
update(): Handles PATCH requests to update an Educational Program by ID.
remove():Remove an educational program by ID, after receiving confirmation from the user.
Educational programs Service
create():Validates and creates a new Educational Program.
findAll(): Validates and recovers all educational programs, if records are found.
byId(): Validates and retrieves an educational program by ID, verifying that it exists.
update(): Validates and updates the information of an Educational Program by ID.
remove():Remove an educational program by ID. Waiting for user confirmation.
DTOs
CreateEducationalProgramsDto():Defines the data structure to create an Educational Program. Including the type of data you expect, to implement data validation.
UpdateEducationalProgramsDto(): Defines the data structure to update an Educational Program. Including the type of data you expect, to implement data validation.
JSDoc Documentation
Added detailed documentation to all methods and classes in ModuleOrCode and ModuleOrCode for better understanding and maintenance.
Related matters
if it is related to a problem or can
Close #5
Grades
Only the restriction through roles is missing
Thank you for reviewing this pull request. I look forward to your feedback.
General description
This request includes adding validations when adding, modifying and deleting an educational program
EducationalPrograms
. It includes the modification of the source codes to execute data validation.Changes
EducationalProgramsController
to handle HTTP requests to create, read, update, and delete educational programs.EducationalProgramsService
was modified to perform some of the validations specified in the DTOs.Details
Educational Program Controller
create()
:Handles POST requests to create new educational programs.findAll()
: Handles GET requests to retrieve all educational programs.findOne()
: Handles GET requests to retrieve educational programs by ID.update()
: Handles PATCH requests to update an Educational Program by ID.remove()
:Remove an educational program by ID, after receiving confirmation from the user.Educational programs Service
create()
:Validates and creates a new Educational Program.findAll()
: Validates and recovers all educational programs, if records are found.byId()
: Validates and retrieves an educational program by ID, verifying that it exists.update()
: Validates and updates the information of an Educational Program by ID.remove()
:Remove an educational program by ID. Waiting for user confirmation.DTOs
CreateEducationalProgramsDto()
:Defines the data structure to create an Educational Program. Including the type of data you expect, to implement data validation.UpdateEducationalProgramsDto()
: Defines the data structure to update an Educational Program. Including the type of data you expect, to implement data validation.JSDoc Documentation
ModuleOrCode
andModuleOrCode
for better understanding and maintenance.Related matters
if it is related to a problem or can
Grades
Thank you for reviewing this pull request. I look forward to your feedback.