Compare commits

...

1 Commits

Author SHA1 Message Date
王性驊 0dcd5fcf11 fix: comment public flag 2025-05-05 20:54:52 +08:00
2 changed files with 6 additions and 1 deletions

View File

@ -25,6 +25,8 @@ type MockCommentRepository struct {
isgomock struct{} isgomock struct{}
} }
// MockCommentRepositoryMockRecorder is the mock recorder for MockCommentRepository. // MockCommentRepositoryMockRecorder is the mock recorder for MockCommentRepository.
type MockCommentRepositoryMockRecorder struct { type MockCommentRepositoryMockRecorder struct {
mock *MockCommentRepository mock *MockCommentRepository

View File

@ -97,7 +97,10 @@ func (use *CommentUseCase) GetCommentItem(ctx context.Context, id string) (*usec
} }
func (use *CommentUseCase) UpdateCommentMessage(ctx context.Context, id string, message string, isVisitable bool) error { func (use *CommentUseCase) UpdateCommentMessage(ctx context.Context, id string, message string, isVisitable bool) error {
err := use.Comment.UpdateCommentMessage(ctx, id, message, isVisitable) snappyContent := snappy.Encode(nil, []byte(message))
msg := base64.StdEncoding.EncodeToString(snappyContent)
err := use.Comment.UpdateCommentMessage(ctx, id, msg, isVisitable)
if err != nil { if err != nil {
return errs.DatabaseErrorWithScopeL( return errs.DatabaseErrorWithScopeL(
code.CloudEPComment, code.CloudEPComment,