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: Fixed a bug where Seq did not change if you brushed your teeth on the same day. And Added code that uses Env files. #13

Merged
merged 2 commits into from
Dec 5, 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,6 +1,7 @@
package com.example.server.controller;

import java.time.LocalDate;
import java.time.ZoneId;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
Expand Down Expand Up @@ -96,7 +97,7 @@ public class ToothController {

// 5. Check Date if Date yesterday or after, change value
LocalDate userDateRenew = user.getToothDateRenew();
LocalDate nowDate = LocalDate.now();
LocalDate nowDate = LocalDate.now(ZoneId.of("Asia/Seoul"));
if(!userDateRenew.isEqual(nowDate)) {
if(userDateRenew.plusDays(1).isEqual(nowDate)) {
// Seq += 1
Expand All @@ -114,9 +115,6 @@ else if (userDateRenew.plusDays(1).isAfter(nowDate)) {
throw new CException(ErrorBase.INTERNAL_SERVER_ERROR);
}
}




ToothDataAnalyzer toothDataAnalyzer = new ToothDataAnalyzer();
toothDataAnalyzer.setReports(toothReports);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
@Service
public class JwtTokenService {

private String secret = "hjkdasfh;jnkladfsjkl;dasfnkl;asdfjkl;asdfjkl;";
private String secret = System.getenv("JWT_SECRET_KEY");

private int accessTokenExpMinutes = 600 * 1000; // 10분

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public void createUserInfo(
PetWeight,
RandomID,
0,
LocalDate.now(ZoneId.of("Asia/Seoul"))
LocalDate.now(ZoneId.of("Asia/Seoul")).minusDays(1)
);

// Database에 Data 저장.
Expand Down
Loading