Skip to content

Commit

Permalink
Merge pull request #92 from nyaruka/clogs_tweak
Browse files Browse the repository at this point in the history
Write channel logs with channels/ key prefex
  • Loading branch information
rowanseymour authored Jun 28, 2023
2 parents c31ae84 + 46fb56b commit 87c8be9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/models/channel_logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion web/ivr/ivr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 87c8be9

Please sign in to comment.