Skip to content

feat: Add update profile endpoint #916

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Apr 12, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
feat: Add UpdateUser to users.sql
  • Loading branch information
BrunoQuaresma committed Apr 7, 2022
commit 2bdcaa8377f8d62880a13faccff7c1507555352d
12 changes: 12 additions & 0 deletions coderd/database/queries/users.sql
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,15 @@ INSERT INTO
)
VALUES
($1, $2, $3, $4, FALSE, $5, $6, $7, $8) RETURNING *;

-- name: UpdateUser :exec
UPDATE
users
SET
email = $2,
"name" = $3,
username = $4,
updated_at = CURRENT_TIMESTAMP
WHERE
id = $1;