Skip to content

Commit

Permalink
refactor: move Member DTOs to member.dto package for better organization
Browse files Browse the repository at this point in the history
  • Loading branch information
Guhapriya01 committed Oct 20, 2024
1 parent 3907744 commit 60781ee
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import com.libraryman_api.fine.FineRepository;
import com.libraryman_api.member.MemberService;
import com.libraryman_api.member.Members;
import com.libraryman_api.member.MembersDto;
import com.libraryman_api.member.dto.MembersDto;
import com.libraryman_api.notification.NotificationService;

import org.springframework.data.domain.Page;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.libraryman_api.book.BookDto;
import com.libraryman_api.fine.Fines;
import com.libraryman_api.member.MembersDto;
import com.libraryman_api.member.dto.MembersDto;

import java.util.Date;

Expand Down
16 changes: 13 additions & 3 deletions src/main/java/com/libraryman_api/member/MemberController.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
package com.libraryman_api.member;

import com.libraryman_api.exception.ResourceNotFoundException;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.web.PageableDefault;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.libraryman_api.exception.ResourceNotFoundException;
import com.libraryman_api.member.dto.MembersDto;
import com.libraryman_api.member.dto.UpdateMembersDto;
import com.libraryman_api.member.dto.UpdatePasswordDto;

/**
* REST controller for managing library members.
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/com/libraryman_api/member/MemberService.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
import com.libraryman_api.exception.InvalidPasswordException;
import com.libraryman_api.exception.InvalidSortFieldException;
import com.libraryman_api.exception.ResourceNotFoundException;
import com.libraryman_api.member.dto.MembersDto;
import com.libraryman_api.member.dto.UpdateMembersDto;
import com.libraryman_api.member.dto.UpdatePasswordDto;
import com.libraryman_api.notification.NotificationService;
import com.libraryman_api.security.config.PasswordEncoder;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package com.libraryman_api.member;
package com.libraryman_api.member.dto;

import java.util.Date;

import com.libraryman_api.member.Role;

public class MembersDto {

private int memberId;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.libraryman_api.member;
package com.libraryman_api.member.dto;

public class UpdateMembersDto {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.libraryman_api.member;
package com.libraryman_api.member.dto;

public class UpdatePasswordDto {

Expand Down

0 comments on commit 60781ee

Please sign in to comment.