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

v1.1.0 #255

Merged
merged 6 commits into from
Oct 30, 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
4 changes: 2 additions & 2 deletions .github/workflows/k3s-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ jobs:
run: |
CHANGED_MODULES=""

if [[ $(git diff --name-only HEAD^ HEAD) =~ ^layer-api/ ]]; then
if git diff --name-only HEAD^ HEAD | grep -q '^layer-api/'; then
if [ -z "$CHANGED_MODULES" ]; then
CHANGED_MODULES="layer-api"
else
CHANGED_MODULES="$CHANGED_MODULES,layer-api"
fi
fi

if [[ $(git diff --name-only HEAD^ HEAD) =~ ^layer-batch/ ]]; then
if git diff --name-only HEAD^ HEAD | grep -q '^layer-batch/'; then
if [ -z "$CHANGED_MODULES" ]; then
CHANGED_MODULES="layer-batch"
else
Expand Down
1 change: 0 additions & 1 deletion layer-api/src/main/java/org/layer/LayerApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,4 @@ public static void main(String[] args) {
SpringApplication.run(LayerApplication.class, args);
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ public void create(AnswerListCreateRequest request, Long spaceId, Long retrospec

if (!retrospect.hasDeadLine()) {
retrospect.updateRetrospectStatus(RetrospectStatus.DONE);
retrospect.updateDeadLine(time.now());
}
retrospectRepository.saveAndFlush(retrospect);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
import org.layer.common.annotation.MemberId;
import org.layer.domain.auth.controller.dto.*;
import org.layer.domain.auth.service.AuthService;
import org.layer.domain.jwt.JwtToken;
import org.layer.domain.jwt.service.JwtService;
import org.layer.domain.member.entity.MemberRole;
import org.layer.domain.member.entity.SocialType;
import org.layer.oauth.service.GoogleService;
import org.layer.oauth.service.KakaoService;
Expand Down Expand Up @@ -96,11 +94,4 @@ public String googleTest(@RequestParam("code") String code) {
public Object kakaoLogin(@RequestParam(value = "code", required = false) String code) {
return kakaoService.getToken(code);
}

// ํ…Œ์ŠคํŠธ์šฉ ์ž„์‹œ ์ปจํŠธ๋กค๋Ÿฌ์ž…๋‹ˆ๋‹ค. (ํ† ํฐ ์—†์ด ์ ‘์† ๊ฐ€๋Šฅ)
// "/create-token?id=๋ฉค๋ฒ„์•„์ด๋””" uri๋กœ get ์š”์ฒญ์„ ๋ณด๋‚ด๋ฉด ํ† ํฐ์ด ๋ฐœ๊ธ‰๋ฉ๋‹ˆ๋‹ค.
@GetMapping("/create-token")
public JwtToken authTest(@RequestParam("id") Long memberId) {
return jwtService.issueToken(memberId, MemberRole.USER);
}
}
4 changes: 2 additions & 2 deletions layer-api/src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spring:
driver-class-name: com.mysql.cj.jdbc.Driver
jpa:
hibernate:
ddl-auto: update
ddl-auto: validate
properties:
hibernate:
format_sql: true
Expand Down Expand Up @@ -49,7 +49,7 @@ google:
sheet:
id: ${GOOGLE_SHEET_ID}
token_path: ${PROD_GOOGLE_TOKEN_PATH}
credential_path: ${PROD_GOOGLE_CREDENTIAL_PATH}
credential_path: ${PROD_GOOGLE_TOKEN_PATH}

apple:
login:
Expand Down
8 changes: 4 additions & 4 deletions layer-batch/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ spring:
config:
import: application-secret.properties
datasource:
url: ${DEV_DB_URL}
username: ${DEV_DB_NAME}
password: ${DEV_DB_PASSWORD}
url: ${PROD_DB_URL}
username: ${PROD_DB_NAME}
password: ${PROD_DB_PASSWORD}
driver-class-name: com.mysql.cj.jdbc.Driver
jpa:
hibernate:
ddl-auto: update
ddl-auto: validate
properties:
hibernate:
format_sql: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public void validateRetrospectStatusDone() {

public void updateRetrospect(String title, String introduction, LocalDateTime deadline, Time time) {

if (deadline.isBefore(time.now())) {
if (deadline != null && deadline.isBefore(time.now())) {
throw new RetrospectException(INVALID_DEADLINE);
}

Expand All @@ -104,4 +104,8 @@ public boolean hasDeadLine() {

return true;
}

public void updateDeadLine(LocalDateTime deadline){
this.deadline = deadline;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.Test;
import org.layer.domain.retrospect.entity.AnalysisStatus;
import org.layer.domain.retrospect.entity.Retrospect;
import org.layer.domain.retrospect.entity.RetrospectStatus;

Expand All @@ -12,7 +13,7 @@ public class RetrospectTest {
@Test
void ์ง„ํ–‰์ค‘์ธ_ํšŒ๊ณ ๋Š”_์ง„ํ–‰์—ฌ๋ถ€๋กœ์ง์—์„œ_์˜ˆ์™ธ๋ฅผ_๋ฐœ์ƒ์‹œํ‚ค์ง€_์•Š๋Š”๋‹ค() {
// given
Retrospect retrospect = new Retrospect(1L, "ํšŒ๊ณ ์ œ๋ชฉ์ž…๋‹ˆ๋‹ค", "ํšŒ๊ณ ์†Œ๊ฐœ์ž…๋‹ˆ๋‹ค", RetrospectStatus.PROCEEDING,
Retrospect retrospect = new Retrospect(1L, "ํšŒ๊ณ ์ œ๋ชฉ์ž…๋‹ˆ๋‹ค", "ํšŒ๊ณ ์†Œ๊ฐœ์ž…๋‹ˆ๋‹ค", RetrospectStatus.PROCEEDING, AnalysisStatus.PROCEEDING,
LocalDateTime.of(2024, 8, 4, 3, 5));

// when
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.layer.domain.retrospect.entity.AnalysisStatus;
import org.layer.domain.retrospect.entity.Retrospect;
import org.layer.domain.retrospect.entity.RetrospectStatus;
import org.layer.domain.retrospect.repository.RetrospectRepository;
Expand All @@ -21,7 +22,7 @@ public class RetrospectRepositoryTest {
@Test
void ๋ฉ€ํ‹ฐ๋ชจ๋“ˆ_๋ ˆํฌ์ง€ํ† ๋ฆฌ_ํ…Œ์ŠคํŠธ() {
// given
Retrospect retrospect = new Retrospect(1L, "ํšŒ๊ณ ์ œ๋ชฉ์ž…๋‹ˆ๋‹ค", "ํšŒ๊ณ ์†Œ๊ฐœ์ž…๋‹ˆ๋‹ค", RetrospectStatus.PROCEEDING,
Retrospect retrospect = new Retrospect(1L, "ํšŒ๊ณ ์ œ๋ชฉ์ž…๋‹ˆ๋‹ค", "ํšŒ๊ณ ์†Œ๊ฐœ์ž…๋‹ˆ๋‹ค", RetrospectStatus.PROCEEDING, AnalysisStatus.PROCEEDING,
LocalDateTime.of(2024, 8, 4, 3, 5));

// when
Expand Down
Loading