Skip to content

Commit

Permalink
Merge pull request #20 from YukiOnishi1129/feature/YL-49-prisma
Browse files Browse the repository at this point in the history
Feature/yl 49 prisma
  • Loading branch information
YukiOnishi1129 authored Apr 4, 2024
2 parents 54beeb8 + 91c581d commit 7ed138d
Show file tree
Hide file tree
Showing 26 changed files with 6,184 additions and 202 deletions.
7 changes: 4 additions & 3 deletions batch-service/cmd/usecase/article.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,13 @@ func (au *ArticleUsecase) BatchCreateArticles(ctx context.Context) error {
// insert article
articleID, _ := uuid.NewUUID()
publishedAt := time.Unix(int64(r.PublishedAt), 0)
articleTitle := ""
if len(r.Title) > 255 {
articleTitle = r.Title[:255]
articleTitle := r.Title
if len(articleTitle) > 255 {
articleTitle = articleTitle[:255]
}
article := entity.Article{
ID: articleID.String(),
PlatformID: f.PlatformID,
Title: articleTitle,
Description: r.Description,
ThumbnailURL: r.ImageURL,
Expand Down
Loading

0 comments on commit 7ed138d

Please sign in to comment.