Skip to content

Commit 9750c65

Browse files
authored
refactor: mappers return single item (#6)
1 parent d50087c commit 9750c65

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mappers/audit_log_mapper.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func (c *AuditLogMapper) Identifier() string {
2020
return "audit_log_mapper"
2121
}
2222

23-
func (c *AuditLogMapper) Map(ctx context.Context, a any) ([]*rows.AuditLog, error) {
23+
func (c *AuditLogMapper) Map(ctx context.Context, a any) (*rows.AuditLog, error) {
2424
// validate input type is string
2525
input, ok := a.(string)
2626
if !ok {
@@ -37,5 +37,5 @@ func (c *AuditLogMapper) Map(ctx context.Context, a any) ([]*rows.AuditLog, erro
3737
row := rows.NewAuditLog()
3838
row.FromMap(fields)
3939

40-
return []*rows.AuditLog{row}, nil
40+
return row, nil
4141
}

0 commit comments

Comments
 (0)