Skip to content

Commit

Permalink
Merge pull request #1862 from bcgov/featute/yup-validation
Browse files Browse the repository at this point in the history
Yup validations for edx routes.
  • Loading branch information
sumathi-thirumani authored Aug 30, 2024
2 parents e8ccdd5 + 62fc14b commit 10e0df9
Show file tree
Hide file tree
Showing 15 changed files with 1,162 additions and 193 deletions.
12 changes: 7 additions & 5 deletions backend/src/routes/districts.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

59 changes: 31 additions & 28 deletions backend/src/routes/edx.js

Large diffs are not rendered by default.

23 changes: 13 additions & 10 deletions backend/src/routes/institute.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion backend/src/routes/penServices.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ const {
checkSdcSchoolCollectionAccess
} = require('../components/permissionUtils');
const {PERMISSION} = require('../util/Permission');
const validate = require('../components/validator');
const { validateStudentSchema } = require('../validations/penServices');

/*
* Get results of student demographics validation
*/
router.post('/sdcSchoolCollection/:sdcSchoolCollectionID/demog-validation', passport.authenticate('jwt', {session: false}, undefined), auth.isValidBackendToken(), validateAccessToken, checkEdxUserPermission(PERMISSION.SCHOOL_SDC_EDIT), findSdcSchoolCollectionID_params, loadSdcSchoolCollection, checkSdcSchoolCollectionAccess, validateStudentDemogData);
router.post('/sdcSchoolCollection/:sdcSchoolCollectionID/demog-validation', passport.authenticate('jwt', {session: false}, undefined), auth.isValidBackendToken(), validateAccessToken, checkEdxUserPermission(PERMISSION.SCHOOL_SDC_EDIT), validate(validateStudentSchema), findSdcSchoolCollectionID_params, loadSdcSchoolCollection, checkSdcSchoolCollectionAccess, validateStudentDemogData);
router.get('/prbValidationTypeCodes', passport.authenticate('jwt', {session: false}, undefined), auth.isValidBackendToken(), getCachedPENServicesData(constants.CACHE_KEYS.PRB_VALIDATION_ISSUE_TYPE_CODES, 'penServices:prbValidationTypeCodesURL'));

module.exports = router;
16 changes: 8 additions & 8 deletions backend/src/routes/schools.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 10e0df9

Please sign in to comment.