diia-open-source / be-user-service

European Union Public License 1.2
136 stars 7 forks source link

Missing transactions #74

Open vhuty opened 6 months ago

vhuty commented 6 months ago

When creating a certificate, it's possible for two connections to create same certificate multiple times: https://github.com/diia-open-source/be-user-service/blob/b45a0e2db354df110a99254516a414aaac43be61/src/services/diiaId.ts#L166

Executing countDocuments and confirmEresidentCreation in a single transaction should solve this issue