Skip to content

Commit

Permalink
isPrivate
Browse files Browse the repository at this point in the history
  • Loading branch information
YukiOnishi1129 committed May 4, 2024
1 parent fec6b1e commit 6cc0def
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion batch-service/internal/crawler/article_contents_crawler.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func CreateArticle(ctx context.Context, tx *sql.Tx, arg CreateArticleArg) error
ArticleURL: arg.ArticleURL,
PublishedAt: null.TimeFrom(publishedAt),
IsEng: arg.IsEng,
IsPrivate: true,
IsPrivate: false,
}
if arg.AuthorName != nil {
article.AuthorName = null.StringFromPtr(arg.AuthorName)
Expand Down
5 changes: 5 additions & 0 deletions web/client/src/features/articles/repository/article.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,11 @@ export const getArticles = async ({
];
}

where = {
...where,
isPrivate: false,
};

try {
const res = await prisma.article.findMany({
take: LIMIT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export const CreateBookmarkDialog: FC<CreateBookmarkDialogProps> = ({
articleUrl: url,
thumbnailURL: ogpData?.image || "",
isEng: isEng,
isPrivate: false,
isPrivate: true,
});

if (!createdArticleId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export const CreateFavoriteArticleDialog: FC<
articleUrl: url,
thumbnailURL: ogpData?.image || "",
isEng: isEng,
isPrivate: false,
isPrivate: true,
});

if (!createdArticleId) {
Expand Down

0 comments on commit 6cc0def

Please sign in to comment.