1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-08-26 18:20:57 +00:00

Fix error handling & add timestamp check

This commit is contained in:
Michael Jerger 2024-01-13 14:17:11 +01:00
parent 40ec049013
commit dabd773f6b
5 changed files with 56 additions and 27 deletions

View file

@ -4,6 +4,8 @@
package forgefed
import (
"time"
"code.gitea.io/gitea/modules/timeutil"
"code.gitea.io/gitea/modules/validation"
)
@ -14,7 +16,7 @@ type FederationInfo struct {
ID int64 `xorm:"pk autoincr"`
HostFqdn string `xorm:"host_fqdn UNIQUE INDEX VARCHAR(255) NOT NULL"`
NodeInfo NodeInfo `xorm:"extends NOT NULL"`
LatestActivity timeutil.TimeStamp `xorm:"NOT NULL"`
LatestActivity time.Time `xorm:"NOT NULL"`
Create timeutil.TimeStamp `xorm:"created"`
Updated timeutil.TimeStamp `xorm:"updated"`
}