Skip to content

Commit

Permalink
fix: time displayed incorrectly in audit log
Browse files Browse the repository at this point in the history
  • Loading branch information
stonith404 committed Nov 11, 2024
1 parent 725388f commit 3d3fb4d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 18 deletions.
6 changes: 3 additions & 3 deletions backend/internal/dto/audit_log_dto.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ package dto

import (
"github.com/stonith404/pocket-id/backend/internal/model"
"time"
datatype "github.com/stonith404/pocket-id/backend/internal/model/types"
)

type AuditLogDto struct {
ID string `json:"id"`
CreatedAt time.Time `json:"createdAt"`
ID string `json:"id"`
CreatedAt datatype.DateTime `json:"createdAt"`

Event model.AuditLogEvent `json:"event"`
IpAddress string `json:"ipAddress"`
Expand Down
28 changes: 15 additions & 13 deletions backend/internal/dto/user_group_dto.go
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
package dto

import "time"
import (
datatype "github.com/stonith404/pocket-id/backend/internal/model/types"
)

type UserGroupDtoWithUsers struct {
ID string `json:"id"`
FriendlyName string `json:"friendlyName"`
Name string `json:"name"`
CustomClaims []CustomClaimDto `json:"customClaims"`
Users []UserDto `json:"users"`
CreatedAt time.Time `json:"createdAt"`
ID string `json:"id"`
FriendlyName string `json:"friendlyName"`
Name string `json:"name"`
CustomClaims []CustomClaimDto `json:"customClaims"`
Users []UserDto `json:"users"`
CreatedAt datatype.DateTime `json:"createdAt"`
}

type UserGroupDtoWithUserCount struct {
ID string `json:"id"`
FriendlyName string `json:"friendlyName"`
Name string `json:"name"`
CustomClaims []CustomClaimDto `json:"customClaims"`
UserCount int64 `json:"userCount"`
CreatedAt time.Time `json:"createdAt"`
ID string `json:"id"`
FriendlyName string `json:"friendlyName"`
Name string `json:"name"`
CustomClaims []CustomClaimDto `json:"customClaims"`
UserCount int64 `json:"userCount"`
CreatedAt datatype.DateTime `json:"createdAt"`
}

type UserGroupCreateDto struct {
Expand Down
4 changes: 2 additions & 2 deletions backend/internal/dto/webauthn_dto.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package dto

import (
"github.com/go-webauthn/webauthn/protocol"
"time"
datatype "github.com/stonith404/pocket-id/backend/internal/model/types"
)

type WebauthnCredentialDto struct {
Expand All @@ -15,7 +15,7 @@ type WebauthnCredentialDto struct {
BackupEligible bool `json:"backupEligible"`
BackupState bool `json:"backupState"`

CreatedAt time.Time `json:"createdAt"`
CreatedAt datatype.DateTime `json:"createdAt"`
}

type WebauthnCredentialUpdateDto struct {
Expand Down

0 comments on commit 3d3fb4d

Please sign in to comment.