fix(#653): call adminConfirmationService.initTable() on startup#814
Merged
Haroldwonder merged 2 commits intoJun 7, 2026
Merged
Conversation
…tartup The admin_confirmations table was never created at startup, causing 'table does not exist' errors on the first call to initiate or confirm. - Created backend/src/admin-confirmation.ts with AdminConfirmationService and its initTable() method - Updated backend/src/index.ts to call initTable() during application startup alongside other database initialization steps Closes Haroldwonder#653
|
@devSoniia is attempting to deploy a commit to the Harold's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves #653
AdminConfirmationServiceinbackend/src/admin-confirmation.tsexposes aninitTable()method that creates theadmin_confirmationstable, but it was never called during application startup. Any call toinitiate()orconfirm()before the table existed would throw a 'table does not exist' error.Changes
backend/src/admin-confirmation.tswithAdminConfirmationService(initTable,initiate,confirm,getPending) and a singleton factorybackend/src/index.tsto calladminConfirmationService.initTable()during startup alongside other DB initialization stepsTesting
The
initTable()method usesCREATE TABLE IF NOT EXISTS, so it is safe to call on every startup.