andela/team-odd-bn-backend

View on GitHub
src/services/BookingService.js

Summary

Maintainability
A
3 hrs
Test Coverage

Function getUserBookingReqService has 57 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  static async getUserBookingReqService(req) {
    const { bookingId: id } = req.params;
    const managerObj = {
      where: { managerId: req.user.id }
    };
Severity: Major
Found in src/services/BookingService.js - About 2 hrs to fix

    Function bookAccommodationService has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      static async bookAccommodationService(req, res) {
        try {
          const accommodationObj = {
            raw: true
          };
    Severity: Minor
    Found in src/services/BookingService.js - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status