🐛 Add missing WithService(nil) in setModerationStatus
The setModerationStatus command was missing the comment.WithService(nil) call that all other comment commands have (delete, insert, list, markAsSpam, update). This caused a nil pointer dereference when calling SetModerationStatus() because the YouTube API service was never initialized. Fixes panic: runtime error: invalid memory address or nil pointer dereference Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
1 parent
818472a870
commit
03dce65e27
1 file changed
+1
@@ -142,6 +142,7 @@ func setModerationStatus(writer io.Writer) error {
|
||||
comment.WithIDs(ids),
|
||||
comment.WithModerationStatus(moderationStatus),
|
||||
comment.WithBanAuthor(banAuthor),
|
||||
comment.WithService(nil),
|
||||
)
|
||||
|
||||
return c.SetModerationStatus(output, jpath, writer)
|
||||
|
||||
Reference in new issue
Block a user