Beispiel #1
0
def get_incomes():
    schema = IncomeSchema(many=True)
    incomes = schema.dump(Income.query.all())
    return incomes.data
Beispiel #2
0
def get_incomes():
  schema = IncomeSchema(many=True)
  incomes = schema.dump(
    filter(lambda t: t.type == TransactionType.INCOME, transactions)
  )
  return jsonify(incomes.data)