These are chat archives for Automattic/mongoose

31st
May 2017
Ankur Anand
@ankur-anand
May 31 2017 05:10
@AdelMahjoub Plug in your own promise http://mongoosejs.com/docs/promises.html
Sandor Lorand
@overnightdev
May 31 2017 15:14
Hi Guys, I have a problem here with mongoose. how can I save to a property of type Decimal128?
I tried sending in a String, or a float or an integer and it doesn't work
price = req.body.price;
price: {type: Schema.Types.Decimal128, required: true},
Sandor Lorand
@overnightdev
May 31 2017 15:36
How else can i send the price guys?
"price": 121.23,
Julio Borja Barra
@juboba
May 31 2017 17:23
I'm getting:
mongoose DeprecationWarning: Calling an asynchronous function without callback is deprecated.
when running:
    Post.findOne({_id: req.params.id})
        .exec()
        .then(post => {
            console.log(post)
            res.json(post)
        })
        .catch(err => {
            console.log(err)
        })