Skip to content

Commit

Permalink
fix: camcasekey
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <[email protected]>
  • Loading branch information
Innei committed Sep 2, 2024
1 parent 9e80c37 commit 5038c4d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion apps/core/src/modules/activity/activity.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import { EventManagerService } from '~/processors/helper/helper.event.service'
import { InjectModel } from '~/transformers/model.transformer'
import { transformDataToPaginate } from '~/transformers/paginate.transformer'
import { checkRefModelCollectionType } from '~/utils/biz.util'
import { camelcaseKeys } from '~/utils/tool.util'

import { CommentState } from '../comment/comment.model'
import { CommentService } from '../comment/comment.service'
Expand Down Expand Up @@ -365,7 +366,13 @@ export class ActivityService implements OnModuleInit, OnModuleDestroy {
if (data.readerId) {
const reader = await this.readerService.findReaderInIds([data.readerId])
if (reader.length) {
Object.assign(serializedPresenceData, { reader: reader[0] })
Object.assign(serializedPresenceData, {
reader: camelcaseKeys({
...reader[0],
_id: undefined,
id: reader[0]._id.toHexString(),
}),
})
}
}

Expand Down

0 comments on commit 5038c4d

Please sign in to comment.