Skip to content

chore: add updated_at to codersdk users #13928

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 3 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion cli/testdata/coder_users_list_--help.golden
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ USAGE:
OPTIONS:
-c, --column string-array (default: username,email,created_at,status)
Columns to display in table output. Available columns: id, username,
email, created at, status.
email, created at, updated at, status.

-o, --output string (default: table)
Output format. Available formats: table, json.
Expand Down
2 changes: 2 additions & 0 deletions cli/testdata/coder_users_list_--output_json.golden
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"name": "Test User",
"email": "testuser@coder.com",
"created_at": "[timestamp]",
"updated_at": "[timestamp]",
"last_seen_at": "[timestamp]",
"status": "active",
"login_type": "password",
Expand All @@ -27,6 +28,7 @@
"name": "",
"email": "testuser2@coder.com",
"created_at": "[timestamp]",
"updated_at": "[timestamp]",
"last_seen_at": "[timestamp]",
"status": "dormant",
"login_type": "password",
Expand Down
12 changes: 12 additions & 0 deletions coderd/apidoc/docs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions coderd/apidoc/swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions coderd/database/db2sdk/db2sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ func ReducedUser(user database.User) codersdk.ReducedUser {
Email: user.Email,
Name: user.Name,
CreatedAt: user.CreatedAt,
UpdatedAt: user.UpdatedAt,
LastSeenAt: user.LastSeenAt,
Status: codersdk.UserStatus(user.Status),
LoginType: codersdk.LoginType(user.LoginType),
Expand Down
1 change: 1 addition & 0 deletions codersdk/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ type ReducedUser struct {
Name string `json:"name"`
Email string `json:"email" validate:"required" table:"email" format:"email"`
CreatedAt time.Time `json:"created_at" validate:"required" table:"created at" format:"date-time"`
UpdatedAt time.Time `json:"updated_at" table:"updated at" format:"date-time"`
LastSeenAt time.Time `json:"last_seen_at" format:"date-time"`

Status UserStatus `json:"status" table:"status" enums:"active,suspended"`
Expand Down
1 change: 1 addition & 0 deletions docs/api/audit.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions docs/api/enterprise.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions docs/api/schemas.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions docs/api/users.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/cli/users_list.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading