Skip to content

API - POST - Register new user #1

@Richard-Persson

Description

@Richard-Persson

Problem Description

After a POST request is sent from /signup the details needs to be validated in the backend.
When the data is validated it will create an new user and store it in the database.

Required Changes

The data sent from the endpoint will be validated in the registerUser() method in authController.java

  • Incoming data should be an email : String | password : String

  • Create a regex to verify both email and password

  • If the data is valid then return a response status with HttpS.OK

  • If the data is not valid then return a response status with HttpS.Not_Created

  • If there is an error return a response status that tells you which field needs changing

  • What is the goal? (Describe the intended outcome)
    register a valid user sucesfully into the database

Acceptance Criteria

Conditions that must be met for the task to be considered complete.

  • user with valid inputs gets registered and put into the database

Dependencies

  • Backend:
  • Frontend
  • Database: User can't already exist in the database

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions