-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #136 from GDG-on-Campus-KNU/dev
Release: v2.0.0
- Loading branch information
Showing
89 changed files
with
2,885 additions
and
621 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
src/main/java/com/gdsc_knu/official_homepage/config/TxTemplateConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.gdsc_knu.official_homepage.config; | ||
|
||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.transaction.PlatformTransactionManager; | ||
import org.springframework.transaction.support.TransactionTemplate; | ||
|
||
@Configuration | ||
public class TxTemplateConfig { | ||
public final TransactionTemplate transactionTemplate; | ||
|
||
public TxTemplateConfig(PlatformTransactionManager transactionManager) { | ||
this.transactionTemplate = new TransactionTemplate(transactionManager); | ||
} | ||
|
||
} |
12 changes: 12 additions & 0 deletions
12
src/main/java/com/gdsc_knu/official_homepage/controller/HealthCheckController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.gdsc_knu.official_homepage.controller; | ||
|
||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
@RestController | ||
public class HealthCheckController { | ||
@GetMapping("/check") | ||
public String healthCheck(){ | ||
return "status up"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 0 additions & 27 deletions
27
src/main/java/com/gdsc_knu/official_homepage/controller/RoleController.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
...main/java/com/gdsc_knu/official_homepage/controller/admin/AdminMemberCheckController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package com.gdsc_knu.official_homepage.controller.admin; | ||
|
||
import com.gdsc_knu.official_homepage.dto.member.MemberResponse; | ||
import com.gdsc_knu.official_homepage.entity.enumeration.Track; | ||
import com.gdsc_knu.official_homepage.service.discord.DiscordClient; | ||
import com.gdsc_knu.official_homepage.service.admin.AdminMemberService; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.stereotype.Controller; | ||
import org.springframework.ui.Model; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestParam; | ||
|
||
import java.util.List; | ||
|
||
@Controller | ||
@RequiredArgsConstructor | ||
public class AdminMemberCheckController { | ||
private final AdminMemberService adminMemberService; | ||
private final DiscordClient discordClient; | ||
|
||
@GetMapping("members") | ||
public String getHtml(Model model) { | ||
model.addAttribute("tracks", Track.values()); | ||
return "members"; | ||
} | ||
|
||
@GetMapping("api/member/check") | ||
public String getMemberByTrack(@RequestParam Track track, Model model) { | ||
List<MemberResponse.WithTrack> response = adminMemberService.getMembersByTrack(track); | ||
model.addAttribute("tracks", Track.values()); | ||
model.addAttribute("defaultTrack", track); | ||
model.addAttribute("members", response); | ||
return "members"; | ||
} | ||
|
||
@PostMapping("api/member/check/attendance") | ||
public ResponseEntity<String> check(@RequestParam List<String> memberNames, | ||
@RequestParam Track track) { | ||
discordClient.sendAttendance(memberNames, track.name()); | ||
return ResponseEntity.ok().body("출첵 완료!"); | ||
} | ||
} |
Oops, something went wrong.