깃헙 백업 연동
This commit is contained in:
@@ -78,7 +78,7 @@ public class ArticleController {
|
||||
}
|
||||
|
||||
Long articleId = articleService.writeArticle(articleForm, principal.getMember());
|
||||
// articleService.pushArticleToGithub(article);
|
||||
articleService.pushArticleToGithub(articleId);
|
||||
tempArticleService.deleteTemp();
|
||||
|
||||
return "redirect:/article/view?articleId=" + articleId;
|
||||
|
||||
@@ -179,8 +179,9 @@ public class ArticleService {
|
||||
/*
|
||||
- 깃헙에 아티클 푸시하기
|
||||
*/
|
||||
public void pushArticleToGithub(Article article) {
|
||||
public void pushArticleToGithub(Long articleId) {
|
||||
try {
|
||||
Article article = articleRepository.findById(articleId).get();
|
||||
GitHub gitHub = new GitHubBuilder().withOAuthToken(gitToken).build();
|
||||
GHRepository repository = gitHub.getRepository(gitRepo);
|
||||
repository.createContent()
|
||||
|
||||
@@ -16,6 +16,7 @@ import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@@ -37,7 +38,7 @@ public class SiteMapService {
|
||||
public String makeSiteMap(){
|
||||
List<Article> articles = articleService.getTotalArticle();
|
||||
List<Category> allCategories = categoryService.getAllCategories();
|
||||
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ");
|
||||
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss Z", Locale.ENGLISH);
|
||||
|
||||
// siteMap 레이아웃 루트 작성
|
||||
Element siteMap = new Element("urlset", NAMESPACE);
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
<div class="col m-2">
|
||||
<a href="/oauth2/authorization/naver">
|
||||
<button class="btnCtm btn-naver">네이버 로그인</button>
|
||||
<button class="btnCtm btn-naver">네이버 로그인<div>(검토중)</div></button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user