@eeplatform/basic-edu 1.10.23 → 1.10.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @eeplatform/basic-edu
2
2
 
3
+ ## 1.10.25
4
+
5
+ ### Patch Changes
6
+
7
+ - 609e753: Validate school route param in controllers
8
+
9
+ ## 1.10.24
10
+
11
+ ### Patch Changes
12
+
13
+ - 4e4bf10: Set status to 'screening' for specialProgram
14
+
3
15
  ## 1.10.23
4
16
 
5
17
  ### Patch Changes
package/dist/index.js CHANGED
@@ -35749,6 +35749,7 @@ function useTrackController() {
35749
35749
  }
35750
35750
  async function getAll(req, res, next) {
35751
35751
  const query = req.query;
35752
+ const school = req.params.school ?? "";
35752
35753
  const validation = import_joi18.default.object({
35753
35754
  page: import_joi18.default.number().min(1).optional().allow("", null),
35754
35755
  limit: import_joi18.default.number().min(1).optional().allow("", null),
@@ -35756,12 +35757,11 @@ function useTrackController() {
35756
35757
  status: import_joi18.default.string().optional().allow("", null),
35757
35758
  school: import_joi18.default.string().hex().optional().allow("", null)
35758
35759
  });
35759
- const { error } = validation.validate(query);
35760
+ const { error } = validation.validate({ ...query, school });
35760
35761
  const page = typeof req.query.page === "string" ? Number(req.query.page) : 1;
35761
35762
  const limit = typeof req.query.limit === "string" ? Number(req.query.limit) : 10;
35762
35763
  const search = req.query.search ?? "";
35763
35764
  const status = req.query.status ?? "active";
35764
- const school = req.query.school ?? "";
35765
35765
  const isPageNumber = isFinite(page);
35766
35766
  if (!isPageNumber) {
35767
35767
  next(new import_nodejs_utils30.BadRequestError("Invalid page number."));
@@ -35914,6 +35914,7 @@ function useStrandController() {
35914
35914
  }
35915
35915
  async function getAll(req, res, next) {
35916
35916
  const query = req.query;
35917
+ const school = req.params.school ?? "";
35917
35918
  const validation = import_joi19.default.object({
35918
35919
  page: import_joi19.default.number().min(1).optional().allow("", null),
35919
35920
  limit: import_joi19.default.number().min(1).optional().allow("", null),
@@ -35922,12 +35923,11 @@ function useStrandController() {
35922
35923
  school: import_joi19.default.string().hex().optional().allow("", null),
35923
35924
  track: import_joi19.default.string().hex().optional().allow("", null)
35924
35925
  });
35925
- const { error } = validation.validate(query);
35926
+ const { error } = validation.validate({ ...query, school });
35926
35927
  const page = typeof req.query.page === "string" ? Number(req.query.page) : 1;
35927
35928
  const limit = typeof req.query.limit === "string" ? Number(req.query.limit) : 10;
35928
35929
  const search = req.query.search ?? "";
35929
35930
  const status = req.query.status ?? "active";
35930
- const school = req.query.school ?? "";
35931
35931
  const track = req.query.track ?? "";
35932
35932
  const isPageNumber = isFinite(page);
35933
35933
  if (!isPageNumber) {
@@ -36113,6 +36113,9 @@ function useEnrollmentService() {
36113
36113
  );
36114
36114
  }
36115
36115
  }
36116
+ if (value.specialProgram) {
36117
+ value.status = "screening";
36118
+ }
36116
36119
  const enrollmentId = await _add(value, session);
36117
36120
  if (value.specialProgram) {
36118
36121
  const programId = String(value.specialProgram);