summaryrefslogtreecommitdiffstats
path: root/models/oauth2_application.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2019-08-15 22:46:21 +0800
committerGitHub <noreply@github.com>2019-08-15 22:46:21 +0800
commit85202d4784758573f80f93dbbda97a444e7ece99 (patch)
tree7957506de8657463e79f121e1b79567ef1cc84a1 /models/oauth2_application.go
parent5a44be627c055d3e9eb406ec4a91579de78b6910 (diff)
downloadgitea-85202d4784758573f80f93dbbda97a444e7ece99.tar.gz
gitea-85202d4784758573f80f93dbbda97a444e7ece99.zip
Display ui time with customize time location (#7792)
* display ui time with customize time location * fix lint * rename UILocation to DefaultUILocation * move time related functions to modules/timeutil * fix tests * fix tests * fix build * fix swagger
Diffstat (limited to 'models/oauth2_application.go')
-rw-r--r--models/oauth2_application.go17
1 files changed, 8 insertions, 9 deletions
diff --git a/models/oauth2_application.go b/models/oauth2_application.go
index 63d2e7ce5e..04c3d7721c 100644
--- a/models/oauth2_application.go
+++ b/models/oauth2_application.go
@@ -11,15 +11,14 @@ import (
"net/url"
"time"
- "github.com/go-xorm/xorm"
- uuid "github.com/satori/go.uuid"
-
"code.gitea.io/gitea/modules/secret"
"code.gitea.io/gitea/modules/setting"
- "code.gitea.io/gitea/modules/util"
+ "code.gitea.io/gitea/modules/timeutil"
"github.com/Unknwon/com"
"github.com/dgrijalva/jwt-go"
+ "github.com/go-xorm/xorm"
+ uuid "github.com/satori/go.uuid"
"golang.org/x/crypto/bcrypt"
)
@@ -36,8 +35,8 @@ type OAuth2Application struct {
RedirectURIs []string `xorm:"redirect_uris JSON TEXT"`
- CreatedUnix util.TimeStamp `xorm:"INDEX created"`
- UpdatedUnix util.TimeStamp `xorm:"INDEX updated"`
+ CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"`
+ UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"`
}
// TableName sets the table name to `oauth2_application`
@@ -264,7 +263,7 @@ type OAuth2AuthorizationCode struct {
CodeChallenge string
CodeChallengeMethod string
RedirectURI string
- ValidUntil util.TimeStamp `xorm:"index"`
+ ValidUntil timeutil.TimeStamp `xorm:"index"`
}
// TableName sets the table name to `oauth2_authorization_code`
@@ -348,8 +347,8 @@ type OAuth2Grant struct {
Application *OAuth2Application `xorm:"-"`
ApplicationID int64 `xorm:"INDEX unique(user_application)"`
Counter int64 `xorm:"NOT NULL DEFAULT 1"`
- CreatedUnix util.TimeStamp `xorm:"created"`
- UpdatedUnix util.TimeStamp `xorm:"updated"`
+ CreatedUnix timeutil.TimeStamp `xorm:"created"`
+ UpdatedUnix timeutil.TimeStamp `xorm:"updated"`
}
// TableName sets the table name to `oauth2_grant`