Skip to content

feat: Added global database management features and optimized the user authentication process#2

Merged
GT-610 merged 7 commits into
mainfrom
init-fix
Mar 23, 2026
Merged

feat: Added global database management features and optimized the user authentication process#2
GT-610 merged 7 commits into
mainfrom
init-fix

Conversation

@GT-610

@GT-610 GT-610 commented Mar 22, 2026

Copy link
Copy Markdown
Owner

Rewrote the user service to support global database instances

Removed database configuration checks to ensure the authentication route is always available

Added the AGENTS.md file to document build instructions

Updated frontend dependency versions


Open with Devin

…r authentication process

Rewrote the user service to support global database instances

Removed database configuration checks to ensure the authentication route is always available

Added the AGENTS.md file to document build instructions

Updated frontend dependency versions
devin-ai-integration[bot]

This comment was marked as resolved.

…tabase switching

Remove explicit database checks from the router and instead retrieve the database dynamically via the `getDB` method

Add the `SetDB` method to allow runtime updates to the database connection

Simplify the network service code structure and remove redundant comments

ci(workflow): Remove the pull request trigger condition for the main branch
devin-ai-integration[bot]

This comment was marked as resolved.

…rations

Add a `sync.RWMutex` to protect database connection operations in the Network Service, preventing data race conditions caused by concurrent access
devin-ai-integration[bot]

This comment was marked as resolved.

…or database initialization

Added a check in NetworkService to verify that the ZeroTier client has not been initialized

Ensure that the database connection is closed if database initialization fails
devin-ai-integration[bot]

This comment was marked as resolved.

Ensure that the connection is properly closed if database initialization fails to prevent resource leaks

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 new potential issues.

View 9 additional findings in Devin Review.

Open in Devin Review

Comment thread internal/app/initializer/server_initializer.go
Comment thread internal/app/handlers/system_handler.go Outdated
…ng up the global database

Before setting up a new global database connection, check for and close any existing connections to prevent resource leaks

Fix incorrect indentation in server_initializer.go
devin-ai-integration[bot]

This comment was marked as resolved.

…ng database reconfiguration

When reconfiguring the database, ensure that the old database connection is closed first

Adjusted the order of global database connection settings to prevent the service from using the old connection
@GT-610 GT-610 merged commit 18d6334 into main Mar 23, 2026
1 check passed
@GT-610 GT-610 deleted the init-fix branch March 23, 2026 03:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant