lms-sync 1.0.74 → 1.0.76
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/apiConnections/mapping.js +49 -38
- package/package.json +1 -1
|
@@ -1943,7 +1943,17 @@ const server = {
|
|
|
1943
1943
|
await db.sequelize.query(`ALTER SEQUENCE ${db_schema}."Students__id_seq" RESTART WITH ${maxId + 1}`);
|
|
1944
1944
|
await db.sequelize.query(`DROP FUNCTION IF EXISTS ${db_schema}."pg_temp.testfunc()"`);
|
|
1945
1945
|
|
|
1946
|
-
|
|
1946
|
+
const studentApi = await api.Student()
|
|
1947
|
+
|
|
1948
|
+
const campusSeq = await Campuses.findAll()
|
|
1949
|
+
const courseSeq = await Courses.findAll()
|
|
1950
|
+
const collegeSeq = await Colleges.findAll()
|
|
1951
|
+
const semesterSeq = await Semesters.findAll()
|
|
1952
|
+
const acadYearSeq = await AcademicYears.findAll()
|
|
1953
|
+
|
|
1954
|
+
const userMail = await Users.findOne({ where: { email: 'ccci_integrator@gmail.com' } });
|
|
1955
|
+
|
|
1956
|
+
let yearDefPayload = {
|
|
1947
1957
|
from: 1799,
|
|
1948
1958
|
to: 1800,
|
|
1949
1959
|
modifiedById: userMail?._id,
|
|
@@ -1958,20 +1968,15 @@ const server = {
|
|
|
1958
1968
|
defaults: yearDefPayload
|
|
1959
1969
|
});
|
|
1960
1970
|
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
const campusSeq = await Campuses.findAll()
|
|
1964
|
-
const courseSeq = await Courses.findAll()
|
|
1965
|
-
const collegeSeq = await Colleges.findAll()
|
|
1966
|
-
const semesterSeq = await Semesters.findAll()
|
|
1967
|
-
const acadYearSeq = await AcademicYears.findAll()
|
|
1968
|
-
|
|
1969
|
-
const userMail = await Users.findOne({ where: { email: 'ccci_integrator@gmail.com' } });
|
|
1971
|
+
|
|
1970
1972
|
const campusDefault = await Campuses.findOne({ where: { name: 'Campus Default' } });
|
|
1971
1973
|
const courseDefault = await Courses.findOne({ where: { name: 'Course Default' } });
|
|
1972
1974
|
const collegeDefault = await Colleges.findOne({ where: { name: 'Colleges Default' } });
|
|
1973
1975
|
const yearDefault = await AcademicYears.findOne({ where: { from: 1799, to: 1800 } });
|
|
1974
1976
|
const semeDefault = await Semesters.findOne({ where: { code: '1st Semester' }});
|
|
1977
|
+
|
|
1978
|
+
|
|
1979
|
+
|
|
1975
1980
|
|
|
1976
1981
|
|
|
1977
1982
|
let createdCounter = 0
|
|
@@ -2216,21 +2221,6 @@ const server = {
|
|
|
2216
2221
|
await db.sequelize.query(`ALTER SEQUENCE ${db_schema}."Sections__id_seq" RESTART WITH ${maxId + 1}`);
|
|
2217
2222
|
await db.sequelize.query(`DROP FUNCTION IF EXISTS ${db_schema}."pg_temp.testfunc()"`);
|
|
2218
2223
|
|
|
2219
|
-
let yearDefPayload = {
|
|
2220
|
-
from: 1799,
|
|
2221
|
-
to: 1800,
|
|
2222
|
-
modifiedById: userMail?._id,
|
|
2223
|
-
createdById: userMail?._id,
|
|
2224
|
-
default: false,
|
|
2225
|
-
}
|
|
2226
|
-
let [yeardef, createdyear] = await AcademicYears.findOrCreate({
|
|
2227
|
-
where: {
|
|
2228
|
-
from: yearDefPayload.from,
|
|
2229
|
-
to: yearDefPayload.to,
|
|
2230
|
-
},
|
|
2231
|
-
defaults: yearDefPayload
|
|
2232
|
-
});
|
|
2233
|
-
|
|
2234
2224
|
const student = (await api.Student()).data;
|
|
2235
2225
|
|
|
2236
2226
|
const subjectApi = await api.Subject();
|
|
@@ -2246,9 +2236,28 @@ const server = {
|
|
|
2246
2236
|
const acadDeptSeq = await AcademicDepartments.findAll()
|
|
2247
2237
|
|
|
2248
2238
|
const userMail = await Users.findOne({ where: { email: 'ccci_integrator@gmail.com' } });
|
|
2239
|
+
|
|
2240
|
+
|
|
2241
|
+
let yearDefPayload = {
|
|
2242
|
+
from: 1799,
|
|
2243
|
+
to: 1800,
|
|
2244
|
+
modifiedById: userMail?._id,
|
|
2245
|
+
createdById: userMail?._id,
|
|
2246
|
+
default: false,
|
|
2247
|
+
}
|
|
2248
|
+
let [yeardef, createdyear] = await AcademicYears.findOrCreate({
|
|
2249
|
+
where: {
|
|
2250
|
+
from: yearDefPayload.from,
|
|
2251
|
+
to: yearDefPayload.to,
|
|
2252
|
+
},
|
|
2253
|
+
defaults: yearDefPayload
|
|
2254
|
+
});
|
|
2255
|
+
|
|
2256
|
+
|
|
2249
2257
|
const yearDefault = await AcademicYears.findOne({ where: { from: 1799, to: 1800 } });
|
|
2250
2258
|
const semeDefault = await Semesters.findOne({ where: { code: '1st Semester' }});
|
|
2251
2259
|
|
|
2260
|
+
|
|
2252
2261
|
let createdCounter = 0
|
|
2253
2262
|
let errorCounter = 0
|
|
2254
2263
|
let uniqueErrors = new Set()
|
|
@@ -2459,7 +2468,20 @@ const server = {
|
|
|
2459
2468
|
await db.sequelize.query(`ALTER SEQUENCE ${db_schema}."EnrolledStudents__id_seq" RESTART WITH ${maxId + 1}`);
|
|
2460
2469
|
await db.sequelize.query(`DROP FUNCTION IF EXISTS ${db_schema}."pg_temp.testfunc()"`);
|
|
2461
2470
|
|
|
2462
|
-
|
|
2471
|
+
const studentApi = (await api.Student()).data
|
|
2472
|
+
const instructorApi = await api.Instructor()
|
|
2473
|
+
|
|
2474
|
+
const studentSeq = await Students.findAll()
|
|
2475
|
+
const courseSeq = await Courses.findAll()
|
|
2476
|
+
const campusSeq = await Campuses.findAll()
|
|
2477
|
+
const acadYearSeq = await AcademicYears.findAll()
|
|
2478
|
+
const semesterSeq = await Semesters.findAll()
|
|
2479
|
+
const sectionSeq = await Sections.findAll()
|
|
2480
|
+
const instructorSeq = await Instructors.findAll()
|
|
2481
|
+
|
|
2482
|
+
const userMail = await Users.findOne({ where: { email: 'ccci_integrator@gmail.com' } });
|
|
2483
|
+
|
|
2484
|
+
let yearDefPayload = {
|
|
2463
2485
|
from: 1799,
|
|
2464
2486
|
to: 1800,
|
|
2465
2487
|
modifiedById: userMail?._id,
|
|
@@ -2474,20 +2496,9 @@ const server = {
|
|
|
2474
2496
|
defaults: yearDefPayload
|
|
2475
2497
|
});
|
|
2476
2498
|
|
|
2477
|
-
const studentApi = (await api.Student()).data
|
|
2478
|
-
const instructorApi = await api.Instructor()
|
|
2479
|
-
|
|
2480
|
-
const studentSeq = await Students.findAll()
|
|
2481
|
-
const courseSeq = await Courses.findAll()
|
|
2482
|
-
const campusSeq = await Campuses.findAll()
|
|
2483
|
-
const acadYearSeq = await AcademicYears.findAll()
|
|
2484
|
-
const semesterSeq = await Semesters.findAll()
|
|
2485
|
-
const sectionSeq = await Sections.findAll()
|
|
2486
|
-
const instructorSeq = await Instructors.findAll()
|
|
2487
|
-
|
|
2488
|
-
const userMail = await Users.findOne({ where: { email: 'ccci_integrator@gmail.com' } });
|
|
2489
2499
|
const yearDefault = await AcademicYears.findOne({ where: { from: 1799, to: 1800 } });
|
|
2490
2500
|
const semeDefault = await Semesters.findOne({ where: { code: '1st Semester' }});
|
|
2501
|
+
|
|
2491
2502
|
|
|
2492
2503
|
let createdCounter = 0
|
|
2493
2504
|
let errorCounter = 0
|