Skip to content

Commit acaa45a

Browse files
committed
Fix handlers and format
1 parent 0e052ae commit acaa45a

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

site/src/components/AuditLogRow/AuditLogRow.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import { UserAvatar } from "components/UserAvatar/UserAvatar"
1010
import { t } from "i18next"
1111
import { ComponentProps, useState } from "react"
1212
import { MONOSPACE_FONT_FAMILY } from "theme/constants"
13+
import userAgentParser from "ua-parser-js"
1314
import { createDayString } from "util/createDayString"
1415
import { AuditLogDiff } from "./AuditLogDiff"
15-
import userAgentParser from "ua-parser-js"
1616

1717
const pillTypeByHttpStatus = (httpStatus: number): ComponentProps<typeof Pill>["type"] => {
1818
if (httpStatus >= 300 && httpStatus < 500) {

site/src/testHelpers/handlers.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,15 @@ export const handlers = [
157157

158158
// Audit
159159
rest.get("/api/v2/audit", (req, res, ctx) => {
160-
return res(ctx.status(200), ctx.json([M.MockAuditLog, M.MockAuditLog2]))
160+
return res(
161+
ctx.status(200),
162+
ctx.json({
163+
audit_logs: [M.MockAuditLog, M.MockAuditLog2],
164+
}),
165+
)
161166
}),
162167

163168
rest.get("/api/v2/audit/count", (req, res, ctx) => {
164-
return res(ctx.status(200), ctx.json(1000))
169+
return res(ctx.status(200), ctx.json({ count: 1000 }))
165170
}),
166171
]

0 commit comments

Comments
 (0)