feat: add conversation retrieve api & return section id field in chat… (#2408)
This commit is contained in:
@ -209,3 +209,23 @@ func DeleteConversationApi(ctx context.Context, c *app.RequestContext) {
|
||||
|
||||
c.JSON(consts.StatusOK, resp)
|
||||
}
|
||||
|
||||
// RetrieveConversationApi .
|
||||
// @router /v1/conversation/retrieve [GET]
|
||||
func RetrieveConversationApi(ctx context.Context, c *app.RequestContext) {
|
||||
var err error
|
||||
var req conversation.RetrieveConversationApiRequest
|
||||
err = c.BindAndValidate(&req)
|
||||
if err != nil {
|
||||
invalidParamRequestResponse(c, err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := application.ConversationSVC.RetrieveConversation(ctx, &req)
|
||||
if err != nil {
|
||||
internalServerErrorResponse(ctx, c, err)
|
||||
return
|
||||
}
|
||||
|
||||
c.JSON(consts.StatusOK, resp)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user