jp-shared 1.0.2 → 1.0.4
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.
|
@@ -15,6 +15,6 @@ const myDB = mongoose.connection.useDb("OA_Job_Portal_API");
|
|
|
15
15
|
|
|
16
16
|
schema.index({ candidateId: 1, sessionId: 1 });
|
|
17
17
|
|
|
18
|
-
const CandidateToken = myDB.model(getDatabaseName, schema);
|
|
18
|
+
const CandidateToken = myDB.model(getDatabaseName(), schema);
|
|
19
19
|
|
|
20
20
|
module.exports = CandidateToken;
|
|
@@ -3,11 +3,15 @@ const { getDatabaseName } = require("../../constants");
|
|
|
3
3
|
|
|
4
4
|
// Define the schema
|
|
5
5
|
const schema = new mongoose.Schema(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
{
|
|
7
|
+
state: { type: String, required: true },
|
|
8
|
+
boards: [
|
|
9
|
+
{
|
|
10
|
+
label: { type: String, required: true },
|
|
11
|
+
},
|
|
12
|
+
],
|
|
13
|
+
},
|
|
14
|
+
{ timestamps: false }
|
|
11
15
|
);
|
|
12
16
|
|
|
13
17
|
const myDB = mongoose.connection.useDb(getDatabaseName());
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const mongoose = require('mongoose');
|
|
2
|
+
const { getDatabaseName } = require("../../constants");
|
|
2
3
|
|
|
3
4
|
const collegeSchema = new mongoose.Schema({
|
|
4
5
|
universityName: {
|
|
@@ -24,5 +25,8 @@ const collegeSchema = new mongoose.Schema({
|
|
|
24
25
|
}
|
|
25
26
|
}, { timestamps: false });
|
|
26
27
|
|
|
27
|
-
const
|
|
28
|
+
const myDB = mongoose.connection.useDb(getDatabaseName());
|
|
29
|
+
|
|
30
|
+
const College = myDB.model('college', collegeSchema);
|
|
31
|
+
|
|
28
32
|
module.exports = College;
|