Skip to content
Merged
Show file tree
Hide file tree
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
Prev Previous commit
Next Next commit
Linting
  • Loading branch information
Emyrk committed Mar 31, 2023
commit fa5ad314ec87a0356f569fb5232d3f5a4ef613e4
2 changes: 1 addition & 1 deletion coderd/database/dbfake/databasefake.go
Original file line number Diff line number Diff line change
Expand Up @@ -4946,7 +4946,7 @@ func (q *fakeQuerier) InsertWorkspaceProxy(_ context.Context, arg database.Inser
return p, nil
}

func (q *fakeQuerier) UpdateWorkspaceProxy(ctx context.Context, arg database.UpdateWorkspaceProxyParams) (database.WorkspaceProxy, error) {
func (q *fakeQuerier) UpdateWorkspaceProxy(_ context.Context, arg database.UpdateWorkspaceProxyParams) (database.WorkspaceProxy, error) {
q.mutex.Lock()
defer q.mutex.Unlock()

Expand Down
4 changes: 2 additions & 2 deletions codersdk/workspaceproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ type WorkspaceProxy struct {
Name string `db:"name" json:"name"`
Icon string `db:"icon" json:"icon"`
// Full url including scheme of the proxy api url: https://us.example.com
Url string `db:"url" json:"url"`
URL string `db:"url" json:"url"`
// URL with the wildcard for subdomain based app hosting: https://*.us.example.com
WildcardUrl string `db:"wildcard_url" json:"wildcard_url"`
WildcardURL string `db:"wildcard_url" json:"wildcard_url"`
CreatedAt time.Time `db:"created_at" json:"created_at"`
UpdatedAt time.Time `db:"updated_at" json:"updated_at"`
Deleted bool `db:"deleted" json:"deleted"`
Expand Down
5 changes: 3 additions & 2 deletions enterprise/coderd/workspaceproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ func (api *API) postWorkspaceProxyByOrganization(rw http.ResponseWriter, r *http
httpapi.Write(ctx, rw, http.StatusCreated, convertProxy(proxy))
}

// nolint:flag-parameter
func validateProxyURL(u string, wildcard bool) error {
p, err := url.Parse(u)
if err != nil {
Expand Down Expand Up @@ -145,8 +146,8 @@ func convertProxy(p database.WorkspaceProxy) codersdk.WorkspaceProxy {
OrganizationID: p.OrganizationID,
Name: p.Name,
Icon: p.Icon,
Url: p.Url,
WildcardUrl: p.WildcardUrl,
URL: p.Url,
WildcardURL: p.WildcardUrl,
CreatedAt: p.CreatedAt,
UpdatedAt: p.UpdatedAt,
Deleted: p.Deleted,
Expand Down