GEWIS / sudosos-backend

SudoSOS is a Node.js-based Bar and POS system made for study association GEWIS.
https://sudosos.gewis.nl
GNU Affero General Public License v3.0
3 stars 3 forks source link

Useful that all transactions/transfers endpoints return PaginatedFinancialMutationResponse #157

Open SuperVK opened 5 months ago

SuperVK commented 5 months ago

Currently all certain endpoints such as users/{id}/transfers or users/{id}/transactions currently return PaginatedTransferResponse and PaginatedBaseTransactionResponse. However these are usually all handled in the same way by the frontend. So even though it seems a bit weird because it is already guaranteed that the type of each transaction/transfer is one or the other, it is easier to change these all to PaginatedFinancialMutation. This way calls from both users/{id}/transfer and pointofsale/{id}/transactions can all be handled as the same type, and be rendered in the exact same component without weird type guarding.

JustSamuel commented 4 months ago

@Yoronex opinion?