(ctx context.Context, dblogs []database.GetAuditLogsOffsetRow)
| 193 | } |
| 194 | |
| 195 | func (api *API) convertAuditLogs(ctx context.Context, dblogs []database.GetAuditLogsOffsetRow) []codersdk.AuditLog { |
| 196 | alogs := make([]codersdk.AuditLog, 0, len(dblogs)) |
| 197 | |
| 198 | for _, dblog := range dblogs { |
| 199 | alogs = append(alogs, api.convertAuditLog(ctx, dblog)) |
| 200 | } |
| 201 | |
| 202 | return alogs |
| 203 | } |
| 204 | |
| 205 | func (api *API) convertAuditLog(ctx context.Context, dblog database.GetAuditLogsOffsetRow) codersdk.AuditLog { |
| 206 | ip, _ := netip.AddrFromSlice(dblog.AuditLog.Ip.IPNet.IP) |
no test coverage detected