diff --git a/core/models/channel_logs.go b/core/models/channel_logs.go index 7d3ad3999..bd98a671c 100644 --- a/core/models/channel_logs.go +++ b/core/models/channel_logs.go @@ -150,7 +150,7 @@ type stChannelLog struct { } func (l *stChannelLog) path() string { - return path.Join(string(l.ChannelUUID), string(l.UUID[:4]), fmt.Sprintf("%s.json", l.UUID)) + return path.Join("channels", string(l.ChannelUUID), string(l.UUID[:4]), fmt.Sprintf("%s.json", l.UUID)) } // InsertChannelLogs writes the given channel logs to the db diff --git a/web/ivr/ivr_test.go b/web/ivr/ivr_test.go index d2a94a01c..802a3c2ef 100644 --- a/web/ivr/ivr_test.go +++ b/web/ivr/ivr_test.go @@ -647,7 +647,7 @@ func getCallLogs(t *testing.T, rt *runtime.Runtime, channelUUID assets.ChannelUU logs := make([][]byte, len(logUUIDs)) for i, logUUID := range logUUIDs { - _, body, err := rt.LogStorage.Get(context.Background(), fmt.Sprintf("/%s/%s/%s.json", channelUUID, logUUID[0:4], logUUID)) + _, body, err := rt.LogStorage.Get(context.Background(), fmt.Sprintf("channels/%s/%s/%s.json", channelUUID, logUUID[0:4], logUUID)) require.NoError(t, err) logs[i] = body }