Repository navigation
feat(api): enable and disable a connection through the bearer API - #51
Merged
Merged
Conversation
PATCH /api/v1/connections/{id} takes the strict body { "active": true | false } and answers 200 with the connection in the shape of GET /api/v1/connections.
setConnectionActive in src/features/connections/lib/connection-service.ts runs the checks of the web console: CONNECTION_EDIT, the install tenant, and the seat gate of a reactivation.
A change records connection.update on channel api with the before and after snapshots, and the value a connection already has writes nothing.
DatabaseConnectionRepository.update now returns the updated connection, so the route needs no second read.
Closes #50
This was referenced Oct 25, 2026
cevheri
added a commit
that referenced
this pull request
Oct 25, 2026
Raise the installer and chart to 1.3.0 and pin the Platform 1.3.0 image index digest sha256:e53ca9b82e337bb995a575ac4082de3da092d33c098a020a13292584fbc49ea9 in the release manifest, the chart values and the Artifact Hub images.
LibreDB Studio stays at 1.1.0 with the Studio chart 0.1.103.
Platform 1.3.0 adds PATCH /api/v1/connections/{id} to the bearer API (#51), which the chart's Artifact Hub changes describe.
release/history/1.3.0.json comes from release:record and the Helm jobs bundle from build:helm-jobs.
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.
Adds
PATCH /api/v1/connections/{id}with the strict body{ "active": true | false }, for the Platform admin mode of LibreDB Mobile.It answers 200 with the connection in the shape of one item of
GET /api/v1/connections, and is documented indocs/api/v1.mdnext to the grant routes.setConnectionActive(src/features/connections/lib/connection-service.ts) runs the checks of the web console:CONNECTION_EDIT, the install tenant, andrequireSeatsForReactivationon an enable.A change records
connection.updateon channelapiwith the before and after snapshots; the value a connection already has writes nothing and records nothing.DatabaseConnectionRepository.updatenow returns the updated connection, so the route needs no second read.Differences from the proposal: an extra field answers 400 with
fieldErrorson the empty key"", as every strict body of/api/v1does today; the doc says Studio reloads on the change notification, typically within a second, withGOVERNANCE_REFRESH_MSas the bound when a notification is lost. The web actionupdateDatabaseConnectionis unchanged.Verified:
npm run lint(0 errors),npm run typecheck,npm test(1010 passed on Node 24),npm run test:db(174 passed, including the newroute.db.test.ts).Closes #50