MCPcopy Index your code
hub / github.com/coder/coder / GetUserChatSpendInPeriod

Method GetUserChatSpendInPeriod

coderd/database/dbauthz/dbauthz.go:4663–4668  ·  view source on GitHub ↗
(ctx context.Context, arg database.GetUserChatSpendInPeriodParams)

Source from the content-addressed store, hash-verified

4661}
4662
4663func (q *querier) GetUserChatSpendInPeriod(ctx context.Context, arg database.GetUserChatSpendInPeriodParams) (int64, error) {
4664 if err := q.authorizeContext(ctx, policy.ActionRead, rbac.ResourceChat.WithOwner(arg.UserID.String())); err != nil {
4665 return 0, err
4666 }
4667 return q.db.GetUserChatSpendInPeriod(ctx, arg)
4668}
4669
4670func (q *querier) GetUserCodeDiffDisplayMode(ctx context.Context, userID uuid.UUID) (string, error) {
4671 user, err := q.db.GetUserByID(ctx, userID)

Callers

nothing calls this directly

Calls 4

authorizeContextMethod · 0.95
WithOwnerMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected