Uh oh!
There was an error while loading. Please reload this page.
feat(api/v2): ✨ Implement socials routes - #135
Merged
Merged
Conversation
Adds the /socials section: a public per-team listing, plus create, bulk upsert, update and delete scoped to the authenticated team. Every route is registered bare and behind a :teamId prefix, matching the application questions section, which socials mirror closely. The bulk PUT leaves links that are not part of the payload untouched and answers 404 rather than 403 for an ID owned by another team. Closes#60 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Nudelsuppe42
approved these changes
Aug 28, 2026
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
Closes#60.
Adds the
/socialssection to api-v2, covering every route the issue lists.GET /socialsGET /:teamId/socials?slug=trueresolves the team by slugPOST /socialsPUT /socialsPUT /socials/:idDELETE /socials/:idEvery route is registered both bare and behind a
:teamIdprefix, and the prefix is only ever allowed to name the team the token already belongs to (@TeamScope).Notes
applications/questions, which has the same shape — a team-owned resource with a bulk upsert — so the service, DTOs and tests follow it deliberately closely.GET /buildteams/:id/socialswas public there, and the links are rendered on the public team page, so the prefixed form is public (@OptionalAuth) while the bare form falls back to the authenticated team and answers 401 without a token.DELETE /socials/:idis for, and a silent delete-on-omit is easy to trigger by accident.urlis validated as a non-empty string rather than with@IsUrl(). Existing rows written by v1 hold arbitrary strings (mailto:addresses, app-specific schemes), so a stricter rule would reject data the API already serves.sortByallowsid,name,icon,url; filtering allowsname,icon,url.Testing
yarn ws api-v2 test— 27 suites, 155 tests, all passing. 38 of those are new:socials.service.spec.ts— pagination/sorting/filtering, slug resolution, team scoping on update and delete, and the upsert paths (update existing, create new, create with a caller-supplied ID, cross-team refusal, bulk limit).socials.controller.spec.ts— team resolution, theslugflag not leaking into the filter, and the 401 on the unprefixed listing.socials.routes.spec.ts— end to end through the real router, including thatPUT /socialsreaches the bulk upsert whilePUT /socials/:idreaches the single update.yarn ws api-v2 buildpasses.lintreports the 6 pre-existingunbound-methoderrors documented in CLAUDE.md and nothing new.🤖 Generated with Claude Code