Skip to content

Commit 18952f4

Browse files
committed
Fix linting errors and tests
1 parent e8ac802 commit 18952f4

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

coderd/workspaceagents.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ func (api *API) workspaceAgent(rw http.ResponseWriter, r *http.Request) {
6767

6868
var eg errgroup.Group
6969
eg.Go(func() (err error) {
70-
dbApps, err = api.Database.GetWorkspaceAppsByAgentID(ctx, workspaceAgent.ID)
70+
// nolint:gocritic // This is a system restricted operation.
71+
dbApps, err = api.Database.GetWorkspaceAppsByAgentID(dbauthz.AsSystemRestricted(ctx), workspaceAgent.ID)
7172
return err
7273
})
7374
eg.Go(func() (err error) {

codersdk/workspaceapps.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ type Healthcheck struct {
101101

102102
type WorkspaceAppStatus struct {
103103
ID uuid.UUID `json:"id" format:"uuid"`
104-
CreatedAt time.Time `json:"created_at"`
104+
CreatedAt time.Time `json:"created_at" format:"date-time"`
105105
WorkspaceID uuid.UUID `json:"workspace_id" format:"uuid"`
106106
AgentID uuid.UUID `json:"agent_id" format:"uuid"`
107107
AppID uuid.UUID `json:"app_id" format:"uuid"`

site/src/testHelpers/entities.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -913,6 +913,7 @@ export const MockWorkspaceApp: TypesGen.WorkspaceApp = {
913913
},
914914
hidden: false,
915915
open_in: "slim-window",
916+
statuses: [],
916917
};
917918

918919
export const MockWorkspaceAgentLogSource: TypesGen.WorkspaceAgentLogSource = {
@@ -1371,6 +1372,7 @@ export const MockWorkspace: TypesGen.Workspace = {
13711372
healthy: true,
13721373
failing_agents: [],
13731374
},
1375+
latest_app_status: null,
13741376
automatic_updates: "never",
13751377
allow_renames: true,
13761378
favorite: false,

0 commit comments

Comments
 (0)