api:list all connections and get by connection by id #29#37
Merged
aliamerj merged 1 commit intoDcup-dev:mainfrom Apr 5, 2025
aliamerj:ingestion-api-endpoints
Merged
api:list all connections and get by connection by id #29#37aliamerj merged 1 commit intoDcup-dev:mainfrom aliamerj:ingestion-api-endpoints
aliamerj merged 1 commit intoDcup-dev:mainfrom
aliamerj:ingestion-api-endpoints
Conversation
Contributor
There was a problem hiding this comment.
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
lib/api_key.ts:32
- [nitpick] For an unauthorized error, consider using a message that clearly indicates missing or invalid authorization rather than a generic 'not found' message.
message: "The requested resource was not found."
app/api/connections/[id]/route.ts:76
- [nitpick] Consider using a consistent error code format such as 'not_found' and ensuring the message has proper capitalization (e.g., 'Connection not found').
code: "Not Found",
Contributor
There was a problem hiding this comment.
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
app/api/connections/[id]/route.ts:9
- The definition of Params wraps 'params' in a Promise, which is unconventional as route parameters are typically provided directly rather than as a Promise. Consider defining it as a plain object.
type Params = { params: Promise<{ id: string }> }
app/api/connections/[id]/route.ts:77
- The error message 'connection Not Found' should be capitalized consistently (i.e., 'Connection Not Found') to improve clarity and consistency in error responses.
message: "connection Not Found",
Signed-off-by: aliamerj <aliamer19ali@gmail.com>
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.
Part: #29
Description:
/api/connections: list all connections for this api/api/connections/[id]: get connection by idAPI Response Object
{ "connectionId": "56bd7773-507d-4a78-85a0-0377e1c59db6", "identifier": "game", "source": "DIRECT_UPLOAD", "sourceFolder": "*", "metadata": { "type": "my files" }, "isConfigSet": true, "lastSynced": "2025-04-04T15:36:01.789Z", "createdAt": "2025-04-02T20:53:07.573Z", "chunkCount": 2, "pageCount": 1, "files": [ { "name": "resume.pdf", "totalPages": 1, "chunksIds": [ "09692e32-444b-4522-85fc-d0f6992c700f", "a0a84e26-7083-4e38-85f1-c8c86323e22b" ] } ] }