Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] 콕찌르기 무한반복 에러 수정 - #366 #367

Merged
merged 4 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
package org.sopt.app.application.playground;


import feign.HeaderMap;
import feign.Param;
import feign.RequestLine;
import java.util.List;
import java.util.Map;
import org.sopt.app.application.auth.dto.PlaygroundAuthTokenInfo.RefreshedToken;
import org.sopt.app.application.playground.dto.PlaygroundPostInfo.PlaygroundPostResponse;
import org.sopt.app.application.playground.dto.PlaygroundProfileInfo.*;
import org.sopt.app.application.playground.dto.PlaygroundUserFindCondition;
import org.sopt.app.application.playground.dto.RecommendedFriendInfo.PlaygroundUserIds;
import org.sopt.app.presentation.auth.AppAuthRequest;

import java.util.List;
import java.util.Map;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.web.bind.annotation.RequestBody;

@EnableFeignClients
public interface PlaygroundClient {

@RequestLine("POST /api/v1/idp/sso/auth")
Expand Down
8 changes: 3 additions & 5 deletions src/main/java/org/sopt/app/application/poke/PokeService.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,14 @@ private PokeHistory createPokeByApplyingReply(
);

if (!latestPokeFromPokedIsReplyFalse.isEmpty()) {
latestPokeFromPokedIsReplyFalse.get(0).activateReply();
latestPokeFromPokedIsReplyFalse.getFirst().activateReply();
}

PokeHistory createdPoke = PokeHistory.builder()
return historyRepository.save(PokeHistory.builder()
.pokerId(pokerUserId)
.pokedId(pokedUserId)
.message(pokeMessage)
.isReply(false)
.isAnonymous(isAnonymous)
.build();
return historyRepository.save(createdPoke);
.build());
}
}
1 change: 0 additions & 1 deletion src/main/java/org/sopt/app/domain/entity/Friend.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
public class Friend extends BaseEntity {

@Id
@NotNull
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package org.sopt.app.domain.entity.poke;

import jakarta.persistence.*;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.validation.constraints.NotNull;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
Expand All @@ -18,7 +22,6 @@ public class PokeHistory extends BaseEntity {

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@NotNull
private Long id;

@NotNull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ public class PokeMessage extends BaseEntity {

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@NotNull
private Long id;

@NotNull
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/sopt/app/facade/PokeFacade.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public Long pokeFriend(Long pokerUserId, Long pokedUserId, String pokeMessage, B
pokeHistoryService.checkDuplicate(pokerUserId, pokedUserId);
PokeHistory newPoke = pokeService.poke(pokerUserId, pokedUserId, pokeMessage, isAnonymous);

this.applyFriendship(pokerUserId, pokedUserId);
applyFriendship(pokerUserId, pokedUserId);
return newPoke.getId();
}

Expand Down
Loading