Skip to content

Commit 16ca524

Browse files
committed
fix(server): remove auth from proceed-db-migration endpoint
* Auth tables may not exist when migration is pending, causing a bootstrap deadlock * Restores pre-auth-hardening behavior for the idempotent migration endpoint Signed-off-by: Joshua Smith <jbsmith7741@gmail.com>
1 parent 50010e0 commit 16ca524

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

backend/server/api/api.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,9 @@ func SetupApiServer(router *gin.Engine) {
127127
router.UseRawPath = true
128128
// router.UnescapePathValues = false
129129

130-
// Endpoint to proceed database migration (now requires authentication)
131-
router.GET("/proceed-db-migration", auth.RequireAuth(), func(ctx *gin.Context) {
130+
// Endpoint to proceed database migration — must be unauthenticated because
131+
// auth tables may not exist yet when migration is pending.
132+
router.GET("/proceed-db-migration", func(ctx *gin.Context) {
132133
// Execute database migration
133134
errors.Must(services.ExecuteMigration())
134135
// Return success response

0 commit comments

Comments
 (0)