MCPcopy Create free account
hub / github.com/PaperDebugger/paperdebugger / trackLifetimeUsage

Method trackLifetimeUsage

internal/services/usage.go:184–190  ·  view source on GitHub ↗
(ctx context.Context, userID bson.ObjectID, projectID string, cost float64, success bool, now time.Time)

Source from the content-addressed store, hash-verified

182}
183
184func (s *UsageService) trackLifetimeUsage(ctx context.Context, userID bson.ObjectID, projectID string, cost float64, success bool, now time.Time) error {
185 filter := bson.M{
186 "user_id": userID,
187 "project_id": projectID,
188 }
189 return s.upsertUsage(ctx, s.lifetimeCollection, filter, cost, success, now)
190}

Callers 1

TrackUsageMethod · 0.95

Calls 1

upsertUsageMethod · 0.95

Tested by

no test coverage detected