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