Skip to content

Commit 7ae1504

Browse files
committed
Updated the dependencies
1 parent 71857be commit 7ae1504

File tree

6 files changed

+590
-1214
lines changed

6 files changed

+590
-1214
lines changed

.github/job.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ const connectMongoDB = () => {
3232
mongoose.connect(process.env.MONGODB_URI, {
3333
useNewUrlParser: true,
3434
useUnifiedTopology: true,
35-
useCreateIndex: true,
3635
})
3736
const db = mongoose.connection
3837
db.on('error', console.error.bind(console, 'Connection error:'))

package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,27 @@
1010
"scripts": {
1111
"start": "node ./bin/www.js",
1212
"dev": "nodemon ./bin/www.js",
13-
"test": "mocha --exit --timeout 15000",
13+
"test": "mocha --exit --timeout 60000",
1414
"build": "yarn install"
1515
},
1616
"author": "Gaurav Walia",
1717
"license": "ISC",
1818
"dependencies": {
19-
"axios": "^0.21.1",
19+
"axios": "^1.5.1",
2020
"cors": "^2.8.5",
21-
"express": "^4.17.1",
22-
"express-rate-limit": "^5.3.0",
23-
"mongoose": "^5.13.3",
24-
"uuid": "^8.3.2"
21+
"express": "^4.18.2",
22+
"express-rate-limit": "^7.1.1",
23+
"mongoose": "^7.6.2",
24+
"uuid": "^9.0.1"
2525
},
2626
"devDependencies": {
27-
"dotenv": "^10.0.0",
28-
"husky": "^7.0.4",
29-
"lint-staged": "^12.3.8",
30-
"mocha": "^9.0.2",
31-
"nodemon": "^2.0.12",
32-
"prettier": "^2.6.2",
33-
"supertest": "^6.1.3"
27+
"dotenv": "^16.3.1",
28+
"husky": "^8.0.3",
29+
"lint-staged": "^14.0.1",
30+
"mocha": "^10.2.0",
31+
"nodemon": "^3.0.1",
32+
"prettier": "^3.0.3",
33+
"supertest": "^6.3.3"
3434
},
3535
"lint-staged": {
3636
"*.js": "prettier --write"

routes/api/v1/API.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ router.put('/rateCode', authenticateAPI, updateValidator, async (req, res) => {
149149
message: 'Bad Request!!!',
150150
})
151151
})
152-
153152
updateResult.status = 200
154153
updateResult.message = 'Code Ratings are updated'
155154
res.status(200).json(updateResult)

src/engine.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ const {v4: uuidv4} = require('uuid')
77
mongoose.connect(process.env.MONGODB_URI, {
88
useNewUrlParser: true,
99
useUnifiedTopology: true,
10-
useCreateIndex: true,
1110
})
1211
const db = mongoose.connection
1312
db.on('error', console.error.bind(console, 'Connection error:'))
@@ -68,7 +67,6 @@ function callGithubApiToGetFileContent(url) {
6867
* @return Promise
6968
**/
7069
function updateCodeBaseMongoDocument(codeId, codeRating) {
71-
mongoose.set('useFindAndModify', false)
7270
return codeRatingModel.findOneAndUpdate({codeId}, {codeRating}, {new: true})
7371
}
7472

test/test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ describe('testing the code rating engine APIs', () => {
77
let codeId2 = ''
88
const SEARCH_USER = 'GauravWalia19'
99
beforeEach('get the random codes with token', async () => {
10+
console.log('getting the token')
1011
try {
1112
const res = await request(app)
1213
.get('/api/v1/randomCodes')
@@ -15,7 +16,7 @@ describe('testing the code rating engine APIs', () => {
1516
codeId1 = res.body.codeObject1.codeId
1617
codeId2 = res.body.codeObject2.codeId
1718
} catch (err) {
18-
console.log(err)
19+
console.log('Error in getting random codes', err)
1920
}
2021
})
2122

0 commit comments

Comments
 (0)