Skip to content

Commit

Permalink
Fixed NPE in GET to /users/:userId
Browse files Browse the repository at this point in the history
API was tripping when an invalid userId is passed. Fixed it, expect a 404 status if userId is invalid.

Failed to include a file in previous commit.

Closes #51
  • Loading branch information
jmprathab committed Jul 19, 2020
1 parent e8d2266 commit d0e89ab
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/main/java/com/myhome/controllers/mapper/HouseApiMapper.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.myhome.controllers.mapper;

import com.myhome.controllers.response.GetHouseDetailsResponse;
import com.myhome.domain.CommunityHouse;
import java.util.Set;
import org.mapstruct.Mapper;

@Mapper
public interface HouseApiMapper {
Set<GetHouseDetailsResponse.CommunityHouse> communityHouseSetToRestApiResponseCommunityHouseSet(
Set<CommunityHouse> communityHouse);

GetHouseDetailsResponse.CommunityHouse communityHouseToRestApiResponseCommunityHouse(
CommunityHouse communityHouse);
}

0 comments on commit d0e89ab

Please sign in to comment.