diff --git a/pkg/calls/call.go b/pkg/calls/call.go index d7d8c0e..07b633d 100644 --- a/pkg/calls/call.go +++ b/pkg/calls/call.go @@ -19,7 +19,7 @@ func (d CallDuration) Duration() time.Duration { return time.Duration(d) } -func (d CallDuration) Int32Ptr() *int32 { +func (d CallDuration) MsInt32Ptr() *int32 { if time.Duration(d) == 0 { return nil } @@ -106,7 +106,7 @@ func (c *Call) ToPB() *pb.Call { Frequencies: toInt64Slice(c.Frequencies), Patches: toInt32Slice(c.Patches), Sources: toInt32Slice(c.Sources), - Duration: c.Duration.Int32Ptr(), + Duration: c.Duration.MsInt32Ptr(), Audio: c.Audio, } } diff --git a/pkg/sinks/database.go b/pkg/sinks/database.go index 61ff7c0..22bf75c 100644 --- a/pkg/sinks/database.go +++ b/pkg/sinks/database.go @@ -50,7 +50,7 @@ func (s *DatabaseSink) toAddCallParams(call *calls.Call) database.AddCallParams AudioName: common.PtrOrNull(call.AudioName), AudioBlob: call.Audio, AudioType: common.PtrOrNull(call.AudioType), - Duration: call.Duration.Int32Ptr(), + Duration: call.Duration.MsInt32Ptr(), Frequency: call.Frequency, Frequencies: call.Frequencies, Patches: call.Patches,