1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-27 04:38:36 +00:00
This commit is contained in:
Lunny Xiao
2022-10-15 18:36:13 +08:00
committed by Jason Song
parent b5520f098f
commit b00cd8de90

View File

@@ -8,6 +8,7 @@ import (
"fmt"
"regexp"
"code.gitea.io/gitea/models/db"
"code.gitea.io/gitea/modules/timeutil"
)
@@ -40,6 +41,10 @@ type Secret struct {
CreatedUnix timeutil.TimeStamp `xorm:"created NOTNULL"`
}
func init() {
db.RegisterModel(new(Secret))
}
// Validate validates the required fields and formats.
func (s *Secret) Validate() error {
switch {