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

Method UpdateUserChatCompactionThreshold

coderd/database/dbauthz/dbauthz.go:7409–7418  ·  view source on GitHub ↗
(ctx context.Context, arg database.UpdateUserChatCompactionThresholdParams)

Source from the content-addressed store, hash-verified

7407}
7408
7409func (q *querier) UpdateUserChatCompactionThreshold(ctx context.Context, arg database.UpdateUserChatCompactionThresholdParams) (database.UserConfig, error) {
7410 u, err := q.db.GetUserByID(ctx, arg.UserID)
7411 if err != nil {
7412 return database.UserConfig{}, err
7413 }
7414 if err := q.authorizeContext(ctx, policy.ActionUpdatePersonal, u); err != nil {
7415 return database.UserConfig{}, err
7416 }
7417 return q.db.UpdateUserChatCompactionThreshold(ctx, arg)
7418}
7419
7420func (q *querier) UpdateUserChatCustomPrompt(ctx context.Context, arg database.UpdateUserChatCustomPromptParams) (database.UserConfig, error) {
7421 u, err := q.db.GetUserByID(ctx, arg.UserID)

Callers

nothing calls this directly

Calls 3

authorizeContextMethod · 0.95
GetUserByIDMethod · 0.65

Tested by

no test coverage detected