tolulope-od/banka

View on GitHub
server/dummyControllers/AuthController.js

Summary

Maintainability
A
2 hrs
Test Coverage

Function signUp has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  static signUp(req, res) {
    const { firstName, lastName, email, password } = req.body;
    const existingUser = users.some(user => user.email === email);
    if (existingUser) {
      return res.status(409).json({
Severity: Minor
Found in server/dummyControllers/AuthController.js - About 1 hr to fix

    Function signIn has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      static signIn(req, res) {
        const { email, password } = req.body;
        for (let i = 0; i < users.length; i += 1) {
          if (email === users[i].email && password === users[i].password) {
            const userInfo = users[i];
    Severity: Minor
    Found in server/dummyControllers/AuthController.js - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status