Skip to content

Commit 3fd02a7

Browse files
easyCZroboquat
authored andcommitted
[usage] Return extra fields for ListBilledUsage
1 parent ce2d00d commit 3fd02a7

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

components/usage/pkg/apiv1/usage.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,12 @@ func (us *UsageService) ListBilledUsage(ctx context.Context, in *v1.ListBilledUs
3636
}
3737
billedSession := &v1.BilledSession{
3838
AttributionId: string(usageRecord.AttributionID),
39-
UserId: "",
40-
TeamId: "",
41-
WorkspaceId: "",
42-
WorkspaceType: "",
43-
ProjectId: "",
39+
UserId: usageRecord.UserID,
40+
WorkspaceId: usageRecord.WorkspaceID,
41+
WorkspaceType: string(usageRecord.WorkspaceType),
42+
ProjectId: usageRecord.ProjectID,
4443
InstanceId: usageRecord.InstanceID.String(),
45-
WorkspaceClass: "",
44+
WorkspaceClass: usageRecord.WorkspaceClass,
4645
StartTime: timestamppb.New(usageRecord.StartedAt),
4746
EndTime: endTime,
4847
Credits: int64(usageRecord.CreditsUsed),

0 commit comments

Comments
 (0)