src/Database/MongoProvider.js
/**
     * Updates the Axon config in the DB with a new Axon config object.
     *
     * @param {AxonConfig|AxonConfigRaw} data - the schema object to update
     * @returns {Promise<AxonConfig|null>} Updated AxonConfig from the DB
     * @memberof MongoProvider
     */
Updates the Axon config in the DB with a new Axon config object.
@param {AxonConfig|AxonConfigRaw} data - the schema object to update
@returns {Promise} Updated AxonConfig from the DB
@memberof MongoProvider
Updates the Axon config in the DB with a new Axon config object . @param { AxonConfig|AxonConfigRaw } data - the schema object to update @returns { Promise } Updated AxonConfig from the DB @memberof MongoProvider
async saveAxon(data) {
        data.updatedAt = new Date();
        const res = await this.AxonSchema.findOneAndUpdate( {
            id: '1',
        },
        data,
        {
            new: true,
            upsert: true,
            setDefaultsOnInsert: true,
        } ).lean().exec();
        return res && new this.AxonConfig(this.axon, res);
    }
async saveAxon ( data ) { data . updatedAt = new Date ( ) ; const res = await this . AxonSchema . findOneAndUpdate ( { id : '1' , } , data , { new : true , upsert : true , setDefaultsOnInsert : true , } ) . lean ( ) . exec ( ) ; return res && new this . AxonConfig ( this . axon , res ) ; }
Updates the Axon config in the DB with a new Axon config object.
Updates the Axon config in the DB with a new Axon config object .