Skip to content

Commit 49ba5f4

Browse files
committed
fix: print created_at for spam user
1 parent c897e3e commit 49ba5f4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/velog-scripts/scripts/privatePostsOfSpamAccount.mts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import inquirer from 'inquirer'
66
import { ENV } from '../env/env.mjs'
77
import { DiscordService } from '../lib/discord/DiscordService.mjs'
88
import { BlockListService } from '../lib/blockList/BlockListService.mjs'
9-
9+
import { format } from 'date-fns'
1010
interface IRunner {}
1111

1212
@injectable()
@@ -42,6 +42,7 @@ class Runner implements IRunner {
4242
user.id,
4343
username,
4444
user.profile?.display_name || null,
45+
user.created_at,
4546
)
4647

4748
if (!askResult.is_set_private) continue
@@ -136,6 +137,7 @@ class Runner implements IRunner {
136137
userId: string,
137138
username: string,
138139
displayName: string | null,
140+
createdAt: Date,
139141
): Promise<AskDeletePostsResult> {
140142
const blockedList = await this.blockList.readBlockList()
141143
if (blockedList.includes(username)) {
@@ -149,6 +151,7 @@ class Runner implements IRunner {
149151
id: userId,
150152
username: username,
151153
displayName: displayName ?? '',
154+
'가입 날짜': format(createdAt, 'yyyy-MM-dd'),
152155
'업데이트 될 글 개수': posts.length,
153156
'최근 작성된 글': posts.slice(0, 5).map((post) => ({
154157
title: post.title,

0 commit comments

Comments
 (0)