src/Database/MongoProvider.js
/**
     * Initialises a default Axon config.
     *
     * @returns {Promise<AxonConfig>} Newly created Axon config from the DB
     * @memberof MongoProvider
     */
Initialises a default Axon config.
@returns {Promise} Newly created Axon config from the DB
@memberof MongoProvider
Initialises a default Axon config . @returns { Promise } Newly created Axon config from the DB @memberof MongoProvider
async initAxon() {
        const data = await this.AxonSchema.findOneAndUpdate( {
            id: '1',
        },
        {
            id: '1',
            prefix: this.axon.settings.prefixes[0],
            updatedAt: new Date(),
        },
        {
            new: true,
            upsert: true,
            setDefaultsOnInsert: true,
        } ).lean().exec();
        return data && new this.AxonConfig(this.axon, data);
    }
async initAxon ( ) { const data = await this . AxonSchema . findOneAndUpdate ( { id : '1' , } , { id : '1' , prefix : this . axon . settings . prefixes [ 0 ] , updatedAt : new Date ( ) , } , { new : true , upsert : true , setDefaultsOnInsert : true , } ) . lean ( ) . exec ( ) ; return data && new this . AxonConfig ( this . axon , data ) ; }
Initialises a default Axon config.
Initialises a default Axon config .