mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-05-31 07:08:06 +08:00
Fix push mirror, wrong timestamp format (#27153)
I noticed, that the push mirrors endpoint, is the only endpoint which returns the times in long format rather than as time.Time(). I think the behavior should be consistent across the project. ---- ## ⚠️ BREAKING ⚠️ This PR changes the time format used in API responses for all push_mirror endpoints which return a push mirror. --------- Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
@ -15,8 +15,8 @@ func ToPushMirror(pm *repo_model.PushMirror) (*api.PushMirror, error) {
|
||||
RepoName: repo.Name,
|
||||
RemoteName: pm.RemoteName,
|
||||
RemoteAddress: pm.RemoteAddress,
|
||||
CreatedUnix: pm.CreatedUnix.FormatLong(),
|
||||
LastUpdateUnix: pm.LastUpdateUnix.FormatLong(),
|
||||
CreatedUnix: pm.CreatedUnix.AsTime(),
|
||||
LastUpdateUnix: pm.LastUpdateUnix.AsTimePtr(),
|
||||
LastError: pm.LastError,
|
||||
Interval: pm.Interval.String(),
|
||||
SyncOnCommit: pm.SyncOnCommit,
|
||||
|
Reference in New Issue
Block a user