@eeplatform/core 1.5.1 → 1.5.2
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 +6 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -24
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -24
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -31480,20 +31480,7 @@ function useCurriculumRepo() {
|
|
|
31480
31480
|
{ $match: query },
|
|
31481
31481
|
{ $sort: sort },
|
|
31482
31482
|
{ $skip: page * limit },
|
|
31483
|
-
{ $limit: limit }
|
|
31484
|
-
{
|
|
31485
|
-
$project: {
|
|
31486
|
-
_id: 1,
|
|
31487
|
-
school: 1,
|
|
31488
|
-
code: 1,
|
|
31489
|
-
effectiveSchoolYear: 1,
|
|
31490
|
-
maxTeachingHoursPerDay: 1,
|
|
31491
|
-
curriculumMemoRef: 1,
|
|
31492
|
-
status: 1,
|
|
31493
|
-
createdAt: 1,
|
|
31494
|
-
updatedAt: 1
|
|
31495
|
-
}
|
|
31496
|
-
}
|
|
31483
|
+
{ $limit: limit }
|
|
31497
31484
|
]).toArray();
|
|
31498
31485
|
const length = await collection.countDocuments(query);
|
|
31499
31486
|
const data = paginate21(items, page, limit, length);
|
|
@@ -31761,6 +31748,7 @@ var schemaGradeLevel = Joi47.object({
|
|
|
31761
31748
|
educationLevel: Joi47.string().required(),
|
|
31762
31749
|
gradeLevel: Joi47.string().required(),
|
|
31763
31750
|
teachingStyle: Joi47.string().required(),
|
|
31751
|
+
maxNumberOfLearners: Joi47.number().required(),
|
|
31764
31752
|
defaultStartTime: Joi47.string().optional().allow("", null),
|
|
31765
31753
|
defaultEndTime: Joi47.string().optional().allow("", null),
|
|
31766
31754
|
status: Joi47.string().optional().allow("", null),
|
|
@@ -31797,6 +31785,7 @@ function MGradeLevel(value) {
|
|
|
31797
31785
|
educationLevel: value.educationLevel ?? "",
|
|
31798
31786
|
gradeLevel: value.gradeLevel ?? "",
|
|
31799
31787
|
teachingStyle: value.teachingStyle ?? "",
|
|
31788
|
+
maxNumberOfLearners: value.maxNumberOfLearners ?? 0,
|
|
31800
31789
|
defaultStartTime: value.defaultStartTime ?? "",
|
|
31801
31790
|
defaultEndTime: value.defaultEndTime ?? "",
|
|
31802
31791
|
status: value.status ?? "active",
|
|
@@ -32190,16 +32179,7 @@ function useGradeLevelController() {
|
|
|
32190
32179
|
} = useGradeLevelRepo();
|
|
32191
32180
|
async function add(req, res, next) {
|
|
32192
32181
|
const value = req.body;
|
|
32193
|
-
const
|
|
32194
|
-
school: Joi48.string().hex().optional(),
|
|
32195
|
-
educationLevel: Joi48.string().required(),
|
|
32196
|
-
gradeLevel: Joi48.string().required(),
|
|
32197
|
-
teachingStyle: Joi48.string().required(),
|
|
32198
|
-
defaultStartTime: Joi48.string().optional().allow("", null),
|
|
32199
|
-
defaultEndTime: Joi48.string().optional().allow("", null),
|
|
32200
|
-
status: Joi48.string().optional().allow("", null)
|
|
32201
|
-
});
|
|
32202
|
-
const { error } = validation.validate(value);
|
|
32182
|
+
const { error } = schemaGradeLevel.validate(value);
|
|
32203
32183
|
if (error) {
|
|
32204
32184
|
next(new BadRequestError87(error.message));
|
|
32205
32185
|
logger45.info(`Controller: ${error.message}`);
|