Skip to content

[Users] Add Update User Route (PATCH /users/{userId}) #51

@nourshoreibah

Description

@nourshoreibah

User Story

As a user I want to update user information in the Users table.

Description

  • Add the PATCH /users/{userId} route to the users Lambda using:
    node tools/lambda-cli.js add-route users PATCH /users/{userId} --body name:string,isAdmin:boolean
  • Implement partial update logic using Kysely (db.updateTable('users').set({ name, isAdmin }).where('userID', '=', userId)).
  • Test using Swagger and Jest.

Acceptance Criteria

  • Route updates user information correctly.
  • Swagger returns 200 with updated user data.
  • Jest tests confirm updates, invalid IDs, and invalid fields.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions