Conversation
… and remove supplier_id
… with validation and supplier management
…e new_supplier_name
…andling in other costs patch
Tests difference:New Tests |
…n other costs patch
iDome89
approved these changes
Feb 3, 2026
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.
This pull request introduces the PATCH endpoint for updating "other costs" in a campaign's finance section. The changes include updates to the OpenAPI specification, the TypeScript schema types, and the implementation of the PATCH route handler. The main focus is on enabling partial updates to other cost records, including their attachments, with appropriate validation and error handling.
API Endpoint Additions and Updates:
/campaigns/{campaign}/finance/otherCoststo the OpenAPI specification, including request and response schemas, examples, and error responses.campaignto include a description and inline schema, improving clarity and consistency.TypeScript Schema Updates:
pathsandoperationsinterfaces insrc/schema.tsto support the new PATCH endpoint, including request and response types, and updated thecampaignpath parameter to use a string directly. [1] [2] [3] [4] [5]Route Implementation:
OtherCostsPatchRouteinsrc/routes/campaigns/campaignId/finance/otherCosts/_patch/index.ts, handling validation, updating the cost record, managing attachments (including S3 deletion), and returning the updated data. Includes detailed error handling for invalid input, missing resources, and server errors.