refactor: replace DeepCopy with Copy for request handling consistency

This commit is contained in:
CaIon
2025-08-28 14:57:47 +08:00
parent 7e698f658a
commit c21219fcff
12 changed files with 58 additions and 50 deletions

View File

@@ -22,7 +22,7 @@ func AudioHelper(c *gin.Context, info *relaycommon.RelayInfo) (newAPIError *type
return types.NewError(errors.New("invalid request type"), types.ErrorCodeInvalidRequest, types.ErrOptionWithSkipRetry())
}
request, err := common.DeepCopy(audioReq)
request, err := common.Copy(audioReq, false)
if err != nil {
return types.NewError(fmt.Errorf("failed to copy request to AudioRequest: %w", err), types.ErrorCodeInvalidRequest, types.ErrOptionWithSkipRetry())
}