Closed dragonleman closed 6 months ago
Digging a bit further I saw that while adding the voters, the browser does one POST request per sciper number and the requests seams to fail randomly (see attached images). The error message is "Unauthorized - only admins allowed".
In fact, what happens is that the when authorisation is checked, the authEnforcer
is not ready yet. I think adding an await
in front of line 7 of users.ts
should fix the issue.
When I add 5'000 scipers as voters, I get :
The election is created but I cannot do anything :
And I don't see anymore the button "Create form" (as I am not anymore an admin). But if I refresh the page, I can get back the button "Create form" ...
If I put my sciper number at the top of the list of the scipers number, I can vote even with the error message above. But if my sciper number is at the bottom of the list of the scipers number, I am not allowed to vote ...