I have the following schema below and need do an update which is detailed below. Not sure how to go about it.
UserPromo = new Schema
sendFBInvite:
earnedIntros:
type: Number
default: 0
earningActionCounter:
type: Number
default: 0
actions:
type: Number
default:1
earnings:
earnedIntros:
type: Number
default: 0
usedIntros:
type: Number
default: 0
everytime sendFBInvite.earningActionCounter goes to 5 I want sendFBInvite.earnedIntros to increment and earnings.earnedIntros to increment by 1. At the same time I want to reset sendFBInvite.earningActionCounter to 0
Is there a way to do this in one call? thanks in advance for your help!