build/database/User.DAO.js
// This update the user details on the budget change only,
This update the user details on the budget change only.
This update the user details on the budget change only .
async updateUserAbBalance(userId, autoBudget) {
        try {
            const filter = { _id: new bson_1.ObjectId(userId) };
            const update = {
                $set: { autoBudget },
            };
            const options = {};
            return this.collection.updateOne(filter, update, options);
        }
        catch (error) {
            throw new errors_1.ApplicationError('Unable to get user by ID', 500, true, error);
        }
    }
async updateUserAbBalance ( userId , autoBudget ) { try { const filter = { _id : new bson_1 . ObjectId ( userId ) } ; const update = { $set : { autoBudget } , } ; const options = { } ; return this . collection . updateOne ( filter , update , options ) ; } catch ( error ) { throw new errors_1 . ApplicationError ( 'Unable to get user by ID' , 500 , true , error ) ; } }
This update the user details on the budget change only,
This update the user details on the budget change only
// This function will add all the autobudgets to the user // "autobudgets" array. this should only be used on card enrollment