Skip to content

Commit d276bbe

Browse files
author
Wraith Protocol Dev
committed
fix(validation): resolve merge conflicts with upstream/main
Rebased onto upstream/main which had evolved schemas.ts significantly: - Upstream added imageUrlSchema for base64 data URL support - Upstream tightened title (min 4, max 80) and description (min 20, max 500) - Upstream added parseTimelineQuery, comment schemas, parseAssetCodes, parseIso8601Timestamp, typed field param in parsePositiveIntegerQueryParam, include_archived alias for includeDeleted, and a full parseCampaignListQuery Our additions carried forward on top: - validateBody returns 422 (was 400) - tests updated to match - updateMetadataPayloadSchema using upstream constraint levels - PATCH /api/campaigns/:id/metadata route in index.ts (unchanged)
1 parent 4a583c6 commit d276bbe

2 files changed

Lines changed: 301 additions & 170 deletions

File tree

backend/src/middleware/validateBody.test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,7 @@ describe('validateBody', () => {
6262
});
6363

6464
it('returns 422 with the Validation failed shape when a field has the wrong type', async () => {
65-
const response = await request(buildApp())
66-
.post('/echo')
67-
.send({ name: 'goal', age: 'one' });
65+
const response = await request(buildApp()).post('/echo').send({ name: 'goal', age: 'one' });
6866

6967
expect(response.status).toBe(422);
7068
expect(response.body.error).toBe('Validation failed');

0 commit comments

Comments
 (0)