Skip to content

Commit

Permalink
Merge pull request #34 from Integradorl-UdeA/feat/return-loan
Browse files Browse the repository at this point in the history
fixed: sonarlint errors
  • Loading branch information
superpollo2 authored Apr 26, 2024
2 parents 553d630 + cb763b3 commit c326dc8
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,10 @@ public OpenAPI swagger() {
.scheme("bearer")
.bearerFormat("JWT");

// Define security requirement for endpoints that require Bearer token
// SecurityRequirement securityRequirement = new SecurityRequirement()
// .addList("bearerAuth");

// Create OpenAPI object and configure servers, info, security schemes, and security requirements
return new OpenAPI()
.info(info)
.components(new io.swagger.v3.oas.models.Components().addSecuritySchemes("bearerAuth", securityScheme));
//.addSecurityItem(securityRequirement);



}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import com.consola.lis.util.constans.EndpointConstant;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import java.util.List;
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/com/consola/lis/model/entity/Category.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
package com.consola.lis.model.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonRawValue;
import jakarta.persistence.*;
import lombok.*;
import org.hibernate.annotations.CreationTimestamp;

import java.util.Date;

@Data
@Builder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,7 @@ public List<ItemInfoDTO> getAllItems() {
List<InventoryItem> allItems = getAllInventoryItems();
List<ItemInfoDTO> inventoryItems = new ArrayList<>();

allItems.forEach(item -> {
inventoryItems.add(InventoryItemMapper.mapToItemInfo(item, findCategory(item)));

});
allItems.forEach(item -> inventoryItems.add(InventoryItemMapper.mapToItemInfo(item, findCategory(item))));
return inventoryItems;
}

Expand Down
2 changes: 0 additions & 2 deletions src/main/java/com/consola/lis/service/ReturnLoanService.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import com.consola.lis.model.enums.LoanState;
import com.consola.lis.model.repository.LoanRepository;
import com.consola.lis.model.repository.ReturnLoanRepository;
import com.consola.lis.util.exception.IsEmptyException;
import com.consola.lis.util.exception.NotExistingException;
import lombok.AllArgsConstructor;
import lombok.Builder;
Expand Down Expand Up @@ -58,7 +57,6 @@ public void createReturnLoan(ReturnLoanDTO returnLoanRequest) {
}

public List<ReturnLoan> getAllReturnsLoans() {
System.out.println( returnLoanRepository.findAll());
return returnLoanRepository.findAll();
}

Expand Down

0 comments on commit c326dc8

Please sign in to comment.