Skip to content

Commit

Permalink
PR[#59] build 오류 수정 (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
5uhwann authored Jul 26, 2024
1 parent 4c44f5b commit 5988c87
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public List<AllActivityReportResponse> getAll() {

@Transactional(readOnly = true)
public List<AllActivityReportResponse> getMyActivityReports(final User user) {
Club club = clubService.getByUserId(user.getId());
Club club = clubService.findClubByClubId(user.getId());

List<ActivityReport> activityReports = activityReportRepository.findByClubName(
club.getName());
Expand All @@ -73,7 +73,7 @@ public List<DetailActivityReportResponse> getActivityReport(final String term,
public Long register(final User user,
final RegisterActivityReportRequest registerActivityReportRequest) {

Club club = clubService.getByUserId(user.getId());
Club club = clubService.findClubByUserId(user.getId());
ActivityReport activityReport = registerActivityReportRequest.toEntity(club);

ActivityReport savedActivityReport = activityReportRepository.save(activityReport);
Expand All @@ -83,7 +83,7 @@ public Long register(final User user,

public List<ActivityReportDto> update(final User user, final String term,
final List<UpdateActivityReportRequest> requests) {
Club club = clubService.getByUserId(user.getId());
Club club = clubService.findClubByUserId(user.getId());

List<ActivityReport> activityReports = activityReportRepository.findByClubNameAndTerm(
club.getName(), term);
Expand All @@ -96,7 +96,7 @@ public List<ActivityReportDto> update(final User user, final String term,
}

public List<ActivityReportDto> delete(final User user, final String term) {
Club club = clubService.getByUserId(user.getId());
Club club = clubService.findClubByUserId(user.getId());

List<ActivityReport> activityReports = activityReportRepository.findByClubNameAndTerm(
club.getName(), term);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@
import javax.persistence.GenerationType;
import javax.persistence.Id;

import javax.persistence.Table;
import lombok.AccessLevel;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;

@Entity
@Table(name = "users")
@Getter
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public class User extends BaseEntity {
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ spring:
on-profile: local

datasource:
url: jdbc:h2:tcp://localhost/~/projects/ddingdong/ddingdong;NON_KEYWORDS=user;
url: jdbc:h2:tcp://localhost/~/projects/ddingdong/ddingdong
driver-class-name: org.h2.Driver
username: sa
password:
Expand Down
6 changes: 5 additions & 1 deletion src/main/resources/application-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ spring:
on-profile: test

datasource:
url: jdbc:h2:tcp://localhost/~/projects/ddingdong/ddingdong
url: jdbc:h2:mem:ddingdongdb;
driver-class-name: org.h2.Driver
username: sa
password:
Expand All @@ -18,6 +18,10 @@ spring:
format_sql: true
auto_quote_keyword: true

sql:
init:
mode: never

s3:
bucket: "test"
access-key: "test"
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/data.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
insert into user(name, password, role, userid)
insert into users(name, password, role, userid)
values ('ddingdong', '$2a$12$9BIi3IGc79rU3Xgbnxq/X.T37Hlfrf/lSc2/g0HLeM1g7HmFXE8v.', 'ADMIN', 'ddingdong11'),
('cow', '$2a$12$9BIi3IGc79rU3Xgbnxq/X.T37Hlfrf/lSc2/g0HLeM1g7HmFXE8v.', 'CLUB', 'cow11');

Expand Down

0 comments on commit 5988c87

Please sign in to comment.