feat(post): enhance post handling with channel integration
- Updated PostHandler to include channel information in post responses. - Introduced PostChannelBrief DTO to represent channel details associated with posts. - Modified post conversion functions to support channel data, ensuring proper mapping of channel IDs to channel names. - Enhanced ChannelRepository and ChannelService to facilitate batch retrieval of channels by IDs. - Updated wire generation to inject channel service into post handler for improved functionality.
This commit is contained in:
@@ -64,9 +64,10 @@ func ProvideUserHandler(
|
||||
func ProvidePostHandler(
|
||||
postService service.PostService,
|
||||
userService service.UserService,
|
||||
channelService service.ChannelService,
|
||||
logService *service.LogService,
|
||||
) *handler.PostHandler {
|
||||
h := handler.NewPostHandler(postService, userService)
|
||||
h := handler.NewPostHandler(postService, userService, channelService)
|
||||
if ps, ok := postService.(interface{ SetLogService(*service.LogService) }); ok {
|
||||
ps.SetLogService(logService)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user