Skip to content

Commit b3776e0

Browse files
committed
fixup! add nop auditor
1 parent 823a58d commit b3776e0

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

coderd/audit/request.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"github.com/coder/coder/coderd/database"
1212
)
1313

14-
type RequstParams struct {
14+
type RequestParams struct {
1515
Audit Auditor
1616
Log slog.Logger
1717

@@ -21,7 +21,7 @@ type RequstParams struct {
2121
}
2222

2323
type Request[T Auditable] struct {
24-
params *RequstParams
24+
params *RequestParams
2525

2626
Old T
2727
New T
@@ -30,7 +30,7 @@ type Request[T Auditable] struct {
3030
// InitRequest initializes an audit log for a request. It returns a function
3131
// that should be deferred, causing the audit log to be committed when the
3232
// handler returns.
33-
func InitRequest[T Auditable](w http.ResponseWriter, p *RequstParams) (*Request[T], func()) {
33+
func InitRequest[T Auditable](w http.ResponseWriter, p *RequestParams) (*Request[T], func()) {
3434
sw, ok := w.(chimw.WrapResponseWriter)
3535
if !ok {
3636
panic("dev error: http.ResponseWriter is not chimw.WrapResponseWriter")

site/src/api/typesGenerated.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ export interface AssignableRoles extends Role {
3535
}
3636

3737
// From codersdk/audit.go
38+
// Embedded anonymous struct, please fix by naming it
39+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
3840
export type AuditDiff = Record<string, any>
3941

4042
// From codersdk/audit.go

0 commit comments

Comments
 (0)