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

Method UpdateUserChatCustomPrompt

coderd/database/dbauthz/dbauthz.go:7420–7429  ·  view source on GitHub ↗
(ctx context.Context, arg database.UpdateUserChatCustomPromptParams)

Source from the content-addressed store, hash-verified

7418}
7419
7420func (q *querier) UpdateUserChatCustomPrompt(ctx context.Context, arg database.UpdateUserChatCustomPromptParams) (database.UserConfig, error) {
7421 u, err := q.db.GetUserByID(ctx, arg.UserID)
7422 if err != nil {
7423 return database.UserConfig{}, err
7424 }
7425 if err := q.authorizeContext(ctx, policy.ActionUpdatePersonal, u); err != nil {
7426 return database.UserConfig{}, err
7427 }
7428 return q.db.UpdateUserChatCustomPrompt(ctx, arg)
7429}
7430
7431func (q *querier) UpdateUserCodeDiffDisplayMode(ctx context.Context, arg database.UpdateUserCodeDiffDisplayModeParams) (string, error) {
7432 user, 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