Skip to content

Commit db68122

Browse files
committed
mirror struct make LastUpdateUnix nullable
1 parent e427793 commit db68122

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

modules/structs/mirror.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ type PushMirror struct {
2323
// swagger:strfmt date-time
2424
CreatedUnix time.Time `json:"created"`
2525
// swagger:strfmt date-time
26-
LastUpdateUnix time.Time `json:"last_update"`
27-
LastError string `json:"last_error"`
28-
Interval string `json:"interval"`
29-
SyncOnCommit bool `json:"sync_on_commit"`
26+
LastUpdateUnix *time.Time `json:"last_update"`
27+
LastError string `json:"last_error"`
28+
Interval string `json:"interval"`
29+
SyncOnCommit bool `json:"sync_on_commit"`
3030
}

services/convert/mirror.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func ToPushMirror(pm *repo_model.PushMirror) (*api.PushMirror, error) {
1616
RemoteName: pm.RemoteName,
1717
RemoteAddress: pm.RemoteAddress,
1818
CreatedUnix: pm.CreatedUnix.AsTime(),
19-
LastUpdateUnix: pm.LastUpdateUnix.AsTime(),
19+
LastUpdateUnix: pm.LastUpdateUnix.AsTimePtr(),
2020
LastError: pm.LastError,
2121
Interval: pm.Interval.String(),
2222
SyncOnCommit: pm.SyncOnCommit,

0 commit comments

Comments
 (0)