Listoka / bittoka

4 stars 1 forks source link

Tweak Transaction model txOutputs #200

Closed robbyphillips closed 5 years ago

robbyphillips commented 5 years ago

Change naming conventions in txOutputs to make more sense with mongoose .populate methods. New structure is an array of objects that look like

{
  toUser: (listoka db user id that was paid),
  moneyBtnId: (moneyButton user id that was paid),
  amount: (amount paid),
  comment: (object id for comment if applicable),
  post: (object id for post if applicable),
  isListokaAcct: (convenience flag to determine if this is a service fee)
}

Other changes are little tweaks to make sure the new model doesn't break anything, and to make sure the seed file does it's thing correctly.