garyhtou / FBLA-App

A React Native app for FBLA
1 stars 0 forks source link

Chapter Join Code - Potential Missing Chapter #16

Open garyhtou opened 3 years ago

garyhtou commented 3 years ago

With the current way the chapter join code generation and saving works, I think there is a potential for a chapter to "go missing".

If two users were to create a chapter at the same time, this could happen:

User 2 pushing their codeList to firestore will override any codes generated by other users between the time User 2 gets the list and sets the list.

Although it is unlikely that it would happen, it is possible.

garyhtou commented 3 years ago

https://github.com/garytou2/FBLA-App/blob/2d55882f8ac601c112d064364d843f0b766b199e/screens/CreateChapScreen.js#L85-L126