8000 Format · coder/coder@424358e · GitHub
[go: up one dir, main page]

Skip to content

Commit 424358e

Browse files
committed
Format
1 parent 72d4657 commit 424358e

File tree

5 files changed

+265
-259
lines changed

5 files changed

+265
-259
lines changed

site/src/api/api.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ export const getUser = async (): Promise<TypesGen.User> => {
107107
return response.data
108108
}
109109

110-
111110
export const getAuthMethods = async (): Promise<TypesGen.AuthMethods> => {
112111
const response = await axios.get<TypesGen.AuthMethods>(
113112
"/api/v2/users/authmethods",
@@ -140,7 +139,9 @@ export const getUsers = async (
140139
return response.data
141140
}
142141

143-
export const getUserCount = async (options: TypesGen.UserCountRequest): Promise<TypesGen.UserCountResponse> => {
142+
export const getUserCount = async (
143+
options: TypesGen.UserCountRequest,
144+
): Promise<TypesGen.UserCountResponse> => {
144145
const url = getURLWithSearchParams("/api/v2/users/count", options)
145146
const response = await axios.get(url.toString())
146147
return response.data

site/src/pages/UsersPage/UsersPage.test.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,9 @@ describe("UsersPage", () => {
264264
expect(API.getUsers).toBeCalledWith({ offset: 0, limit: 25, q: "" }),
265265
)
266266

267-
const pageButtons = await container.querySelectorAll(`button[name="Page button"]`)
267+
const pageButtons = await container.querySelectorAll(
268+
`button[name="Page button"]`,
269+
)
268270
// count handler says there are 2 pages of results
269271
expect(pageButtons.length).toBe(2)
270272
})

site/src/pages/UsersPage/UsersPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export const UsersPage: FC<{ children?: ReactNode }> = () => {
5050
userIdToResetPassword,
5151
newUserPassword,
5252
paginationRef,
53-
count
53+
count,
5454
} = usersState.context
5555

5656
const { updateUsers: canEditUsers } = usePermissions()

site/src/testHelpers/entities.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export const MockUser: TypesGen.User = {
8383
}
8484

8585
export const MockUserCountResponse: TypesGen.UserCountResponse = {
86-
count: 26
86+
count: 26,
8787
}
8888

8989
export const MockUserAdmin: TypesGen.User = {

0 commit comments

Comments
 (0)
0