Skip to content

Commit 901c5f2

Browse files
committed
Add handler for /count
1 parent dc1543c commit 901c5f2

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

site/src/api/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ interface GetAuditLogsOptions {
390390
}
391391

392392
export const getAuditLogs = async (options: GetAuditLogsOptions): Promise<TypesGen.AuditLog[]> => {
393-
const response = await axios.get(`/api/v2/audit?limit=${options}&offset=${options.offset}`)
393+
const response = await axios.get(`/api/v2/audit?limit=${options.limit}&offset=${options.offset}`)
394394
return response.data
395395
}
396396

site/src/testHelpers/handlers.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,4 +152,8 @@ export const handlers = [
152152
rest.get("/api/v2/audit", (req, res, ctx) => {
153153
return res(ctx.status(200), ctx.json([M.MockAuditLog, M.MockAuditLog2]))
154154
}),
155+
156+
rest.get("/api/v2/audit/count", (req, res, ctx) => {
157+
return res(ctx.status(200), ctx.json(1000))
158+
}),
155159
]

0 commit comments

Comments
 (0)