@eeplatform/basic-edu 1.10.24 → 1.10.26
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 +12 -0
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -35719,6 +35719,7 @@ function useTrackController() {
|
|
|
35719
35719
|
}
|
|
35720
35720
|
async function getAll(req, res, next) {
|
|
35721
35721
|
const query = req.query;
|
|
35722
|
+
const school = req.params.school ?? "";
|
|
35722
35723
|
const validation = Joi18.object({
|
|
35723
35724
|
page: Joi18.number().min(1).optional().allow("", null),
|
|
35724
35725
|
limit: Joi18.number().min(1).optional().allow("", null),
|
|
@@ -35726,12 +35727,11 @@ function useTrackController() {
|
|
|
35726
35727
|
status: Joi18.string().optional().allow("", null),
|
|
35727
35728
|
school: Joi18.string().hex().optional().allow("", null)
|
|
35728
35729
|
});
|
|
35729
|
-
const { error } = validation.validate(query);
|
|
35730
|
+
const { error } = validation.validate({ ...query, school });
|
|
35730
35731
|
const page = typeof req.query.page === "string" ? Number(req.query.page) : 1;
|
|
35731
35732
|
const limit = typeof req.query.limit === "string" ? Number(req.query.limit) : 10;
|
|
35732
35733
|
const search = req.query.search ?? "";
|
|
35733
35734
|
const status = req.query.status ?? "active";
|
|
35734
|
-
const school = req.query.school ?? "";
|
|
35735
35735
|
const isPageNumber = isFinite(page);
|
|
35736
35736
|
if (!isPageNumber) {
|
|
35737
35737
|
next(new BadRequestError29("Invalid page number."));
|
|
@@ -35884,6 +35884,7 @@ function useStrandController() {
|
|
|
35884
35884
|
}
|
|
35885
35885
|
async function getAll(req, res, next) {
|
|
35886
35886
|
const query = req.query;
|
|
35887
|
+
const school = req.params.school ?? "";
|
|
35887
35888
|
const validation = Joi19.object({
|
|
35888
35889
|
page: Joi19.number().min(1).optional().allow("", null),
|
|
35889
35890
|
limit: Joi19.number().min(1).optional().allow("", null),
|
|
@@ -35892,12 +35893,11 @@ function useStrandController() {
|
|
|
35892
35893
|
school: Joi19.string().hex().optional().allow("", null),
|
|
35893
35894
|
track: Joi19.string().hex().optional().allow("", null)
|
|
35894
35895
|
});
|
|
35895
|
-
const { error } = validation.validate(query);
|
|
35896
|
+
const { error } = validation.validate({ ...query, school });
|
|
35896
35897
|
const page = typeof req.query.page === "string" ? Number(req.query.page) : 1;
|
|
35897
35898
|
const limit = typeof req.query.limit === "string" ? Number(req.query.limit) : 10;
|
|
35898
35899
|
const search = req.query.search ?? "";
|
|
35899
35900
|
const status = req.query.status ?? "active";
|
|
35900
|
-
const school = req.query.school ?? "";
|
|
35901
35901
|
const track = req.query.track ?? "";
|
|
35902
35902
|
const isPageNumber = isFinite(page);
|
|
35903
35903
|
if (!isPageNumber) {
|