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:
parent
5f7388e586
commit
0ee7cbf725
3 changed files with 16 additions and 10 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue