Skip to content

Commit cbe7882

Browse files
committed
lint
1 parent e464126 commit cbe7882

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

coderd/workspacequota/workspacequota.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ func NewNop() *nop {
1111
return &nop{}
1212
}
1313

14-
func (_ *nop) UserWorkspaceLimit() int {
14+
func (*nop) UserWorkspaceLimit() int {
1515
return 0
1616
}
17-
func (_ *nop) CanCreateWorkspace(_ int) bool {
17+
func (*nop) CanCreateWorkspace(_ int) bool {
1818
return true
1919
}

coderd/workspaces.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,8 +323,9 @@ func (api *API) postWorkspacesByOrganization(rw http.ResponseWriter, r *http.Req
323323
canCreate := e.CanCreateWorkspace(len(workspaces))
324324
if !canCreate {
325325
httpapi.Write(ctx, rw, http.StatusBadRequest, codersdk.Response{
326-
Message: fmt.Sprintf("User workspace limit of %s is already reached.", e.UserWorkspaceLimit()),
326+
Message: fmt.Sprintf("User workspace limit of %d is already reached.", e.UserWorkspaceLimit()),
327327
})
328+
return
328329
}
329330

330331
templateVersion, err := api.Database.GetTemplateVersionByID(ctx, template.ActiveVersionID)

site/src/components/WorkspaceQuota/WorkspaceQuota.stories.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ const Template: Story<WorkspaceQuotaProps> = (args) => <WorkspaceQuota {...args}
1111
export const Example = Template.bind({})
1212
Example.args = {
1313
quota: {
14-
count: 1,
15-
limit: 3,
14+
user_workspace_count: 1,
15+
user_workspace_limit: 3,
1616
},
1717
}
1818

1919
export const LimitOf1 = Template.bind({})
2020
LimitOf1.args = {
2121
quota: {
22-
count: 1,
23-
limit: 1,
22+
user_workspace_count: 1,
23+
user_workspace_limit: 1,
2424
},
2525
}
2626

@@ -32,7 +32,7 @@ Loading.args = {
3232
export const Disabled = Template.bind({})
3333
Disabled.args = {
3434
quota: {
35-
count: 1,
36-
limit: 0,
35+
user_workspace_count: 1,
36+
user_workspace_limit: 0,
3737
},
3838
}

0 commit comments

Comments
 (0)