Added "info" API endpoint to retrieve app info and configuration (to be used by the client)#125
Merged
Added "info" API endpoint to retrieve app info and configuration (to be used by the client)#125
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new info API endpoint intended to expose application identity/version and selected runtime configuration for client consumption, and centralizes the server app identifier constant.
Changes:
- Introduces
/api/infoendpoint (endpoint wiring + handler) and adds an API test for it. - Adds
EXPERIMENTAL_FEATURESenv flag (ProcessEnv.experimentalFeatures) and updates.env.template. - Adds
ArenaServerConstants.appIdand reuses it for 2FA otpauth issuer generation.
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/service/user2FA/user2FAService.ts |
Uses ArenaServerConstants.appId instead of a local APP_NAME constant when generating the otpauth URL. |
src/processEnv/index.ts |
Adds ProcessEnv.experimentalFeatures sourced from EXPERIMENTAL_FEATURES. |
src/model/index.ts |
Re-exports ArenaServerConstants. |
src/model/ArenaServerConstants.ts |
Defines a central appId constant. |
src/api/info/read.ts |
Implements GET /api/info returning { appInfo, config }. |
src/api/info/index.ts |
Registers the info read route via InfoApi. |
src/api/endpoint/info.ts |
Adds endpoint builder for /api/info. |
src/api/endpoint/index.ts |
Exposes ApiEndpoint.info. |
src/api/api.ts |
Wires InfoApi into overall API initialization. |
src/api/tests/info/index.ts |
Adds a test for the info endpoint response. |
src/api/tests/api.test.ts |
Registers the new info test suite. |
.env.template |
Documents EXPERIMENTAL_FEATURES. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
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.



No description provided.