Skip to content

Implement Update Offering API (Startup, Partial Update) #20

@thlpkee20-wq

Description

@thlpkee20-wq

Description
Implement PATCH /api/offerings/:id (or PUT) for the issuer to update offering fields (e.g. name, description, status). Enforce that only the issuer can update.

Requirements and context

  • Implement only in new files or by extending offerings route/service. Use offering repository update and updateStatus. Do not modify package.json, src/index.ts, or DB client. Require JWT; verify req.user matches offering.issuer_user_id. Return 200 with updated offering or 403/404.
  • Support partial payload (only send fields to update).

Suggested execution

  • Branch: git checkout -b feature/update-offering-api
  • Add PATCH handler; validate body; check ownership; call repository update; return offering.
  • Add tests for success, forbidden, not found, validation.

Test and commit

  • Run tests. Example commit message: feat(api): add update offering endpoint

Guidelines

  • Additive route/service only. Timeframe: 96 hours.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions