mirror of
https://github.com/coder/coder.git
synced 2025-07-12 00:14:10 +00:00
chore: make owner_name and owner_username consistent (#18081)
We've been using owner_name inconsistently as username. So this PR fixes it by making the attribute naming more consistent.
This commit is contained in:
@ -30,7 +30,8 @@ type Workspace struct {
|
||||
CreatedAt time.Time `json:"created_at" format:"date-time"`
|
||||
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
|
||||
OwnerID uuid.UUID `json:"owner_id" format:"uuid"`
|
||||
OwnerName string `json:"owner_name"`
|
||||
OwnerName string `json:"owner_name,omitempty"`
|
||||
OwnerUsername string `json:"owner_username"`
|
||||
OwnerAvatarURL string `json:"owner_avatar_url"`
|
||||
OrganizationID uuid.UUID `json:"organization_id" format:"uuid"`
|
||||
OrganizationName string `json:"organization_name"`
|
||||
@ -69,7 +70,7 @@ type Workspace struct {
|
||||
}
|
||||
|
||||
func (w Workspace) FullName() string {
|
||||
return fmt.Sprintf("%s/%s", w.OwnerName, w.Name)
|
||||
return fmt.Sprintf("%s/%s", w.OwnerUsername, w.Name)
|
||||
}
|
||||
|
||||
type WorkspaceHealth struct {
|
||||
|
Reference in New Issue
Block a user