diff options
| author | Zane Helton <zane99@me.com> | 2025-06-28 18:02:54 -0400 |
|---|---|---|
| committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2025-06-29 13:27:14 +1000 |
| commit | ff692c19b77a7dcae07dcb71f33c4753db106f5d (patch) | |
| tree | b6896735dd6f0029910c40835b32252899af92c6 /src/api | |
| parent | Fix PATCH Template route implementation (diff) | |
| download | server-ts-ff692c19b77a7dcae07dcb71f33c4753db106f5d.tar.xz | |
Await guild creation to fix a race condition
`Promise.all(...)` runs these simultaneously, yet role depends on the guild to be created first. This can lead to a race condition. I've awaited role creation too because the call to `Member.addToGuild(...)` relies on the role to be created.
Diffstat (limited to 'src/api')
| -rw-r--r-- | src/api/routes/guilds/templates/index.ts | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/src/api/routes/guilds/templates/index.ts b/src/api/routes/guilds/templates/index.ts |
