Remove the sync.Mutex and CreateUserAtomic (INSERT ON CONFLICT) in favor of a single DB transaction in CreateFirstUser that atomically checks for existing users and inserts. SQLite serializes write transactions, so this is sufficient to prevent the race condition without application-level locking. |
||
|---|---|---|
| .. | ||
| app | ||
| auth | ||
| deploy | ||
| notify | ||
| webhook | ||