[Ellipsis] Split GitHub router's admin endpoint into two #58
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.
Summary:
Issue: #55
Implementation:
/src/pages/api
directory, create two new files:diffData.ts
andotherData.ts
. These files will contain the code for the new endpoints. ThediffData.ts
endpoint will handle requests for diff data, and theotherData.ts
endpoint will handle requests for all other data.diffData.ts
file, implement the endpoint to fetch the diff data. This endpoint should accept a PR id as a parameter and return the diff data for that PR. Use the existingllm.ts
file as a reference for how to structure the endpoint.otherData.ts
file, implement the endpoint to fetch all other data. This endpoint should accept a PR id as a parameter and return all other data for that PR. Use the existingllm.ts
file as a reference for how to structure the endpoint.callLLM
function in theutils.ts
file and in thehandleSubmit
function in thefill/[id].tsx
file. Replace the/api/llm
endpoint with the appropriate new endpoint (/api/diffData
or/api/otherData
).Report:
Create new endpoints
Created new endpoints diffData.ts and otherData.ts in /src/pages/api directory.Implement diffData endpoint
Implemented the diffData endpoint in the diffData.ts file.Implement otherData endpoint
Implemented the otherData endpoint in the otherData.ts file.Update fetch calls in frontend
Updated the fetch calls in the frontend to use the new endpoints.Something look wrong?: If this Pull Request doesn't contain the expected changes, add more information to #55. Then, add the
ellipsis:create
label to try again. For more information, check the documentation.Generated with ❤️ by ellipsis.dev