File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ var { MongoClient, ObjectId } = require('mongodb')
22var bcrypt = require ( 'bcryptjs' )
33var salt = 10
44// changed url to mongo for mongo docker container
5- var MONGO_URL = process . env . MONGODB_URI || 'mongodb://mongo:27017/ clock'
5+ var MONGO_URL = process . env . MONGODB_URI || 'mongodb+srv ://connor:hB9qRiTQVgYNoJYy@clock-nerd-cluster.ldfnjft.mongodb.net/clocknerd?retryWrites=true&w=majority&appName= clock-nerd-cluster '
66var client = null
77var db = null
88var users = null
@@ -141,8 +141,8 @@ module.exports.deletetime = async function(req, res) {
141141 { $pull : { times : { _id : new ObjectId ( req . body . id ) } } } ,
142142 { returnDocument : 'after' } // Return the updated document
143143 )
144- if ( result && result . value ) {
145- res . status ( 200 ) . send ( { value : result . value } )
144+ if ( result ) {
145+ res . status ( 200 ) . send ( { value : result } )
146146 } else {
147147 res . status ( 404 ) . send ( "User not found" )
148148 }
You can’t perform that action at this time.
0 commit comments