Skip to content

[ROUTES] Create User Endpoints #44

Description

@YKawesome

Description

Create the CRUD (Create, Read, Update, Delete) API routes for the users table.

Users table

  • POST /users - create a user
  • GET /users - get all users
  • GET /users/{id} - get a single user
  • PUT /users/{id} - update a single user
  • DELETE /users/{id} - delete a single user

Recommended Steps

  • Create a new branch (you can create it right from the issue in the right sidebar under "Development")
  • Review the users table schema
  • Create users.js file in /server/routes
  • Implement CRUD routes for the users table (Create, Read, Update, Delete)
  • Implement validation and error handling for all routes
  • Test all routes thoroughly using Postman and take screenshots as proof of functionality

Acceptance Criteria

  • GET routes return all users or a single record by ID
  • POST route creates a new user in the database
  • PUT route updates an existing user record
  • DELETE route removes the correct user from the database
  • Error handling is implemented for all routes.

Resources

  • See projects.js or other entity routes for structure reference.
  • Postman for testing requests.

If you have any questions, feel free to reach out to Yousef on Slack!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions