WYHNUS / ExchangeBuddy

Find your exchange buddies!
5 stars 0 forks source link

Refactor backend using transactions #142

Open WYHNUS opened 7 years ago

WYHNUS commented 7 years ago

Current implementation of backend DB queries are not safe (for instance, for createUniversity endpoint, if university creation is successful, but the following create Wiki failed, university creation is not reverted, causing failure to subsequent call to createUniversity endpoint).

In order to solve the above problem, we should refactor the backend code using transactions, and given we are using Sequelize ORM, we should refer to this.