Skip to content

[Users] Add Create User Route (POST /users) #47

@nourshoreibah

Description

@nourshoreibah

User Story

As a user I want to create a new user in the Users table.

Description

  • Add the POST /users route to the existing users Lambda using:
    node tools/lambda-cli.js add-route users POST /users --body name:string,isAdmin:boolean --status 201
  • If the users Lambda does not exist, create it first with:
    node tools/lambda-cli.js init-handler users
  • Implement insert logic using Kysely for type-safe SQL.
  • Test using Swagger UI and create Jest unit tests for success and validation failures.

Acceptance Criteria

  • Route successfully creates a user record in the local database.
  • Swagger returns 201 with created user data.
  • Jest tests pass for valid and invalid input payloads.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions