Skip to content

feat(api): add stream CRUD REST endpoints (#5) - #136

Merged
Xhristin3 merged 1 commit into
XStreamRollz:mainfrom
nanaf6203-bit:issue/5-streams-crud
Jun 11, 2026
Merged

feat(api): add stream CRUD REST endpoints (#5)#136
Xhristin3 merged 1 commit into
XStreamRollz:mainfrom
nanaf6203-bit:issue/5-streams-crud

Conversation

@nanaf6203-bit

Copy link
Copy Markdown
Contributor

Closes #5

Implements full CRUD REST endpoints for streams at api/src/streams/:

  • POST /streams — Create a new stream (auth required)
  • GET /streams — List streams with pagination and optional status filter (auth required)
  • GET /streams/:id — Get a single stream (ownership required)
  • PATCH /streams/:id — Partial update with status transition validation (ownership required)
  • DELETE /streams/:id — Delete a stream (ownership required)

What was done

  • Created StreamsModule with entity, DTOs, repository, service, and controller following existing TagsModule patterns
  • Added AuthGuard in common/guards/ for user extraction from X-User-Id header (placeholder until JWT auth pipeline lands)
  • Endpoints protected with AuthGuard (create/list) and StreamOwnershipGuard (read/update/delete)
  • Status transition validation: inactive<->active, *->error, error->inactive
  • Full Swagger/OpenAPI documentation with all response decorators
  • TypeScript typecheck passes cleanly

Create StreamsModule with full CRUD (POST/GET/PATCH/DELETE /streams). Add AuthGuard placeholder. Status transition validation, Swagger docs, and class-validator DTOs included.

@Xhristin3 Xhristin3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Xhristin3
Xhristin3 merged commit e5232b9 into XStreamRollz:main Jun 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[api] Create stream CRUD REST endpoints

2 participants