diff --git a/pkg/db/fixtures/api_tokens.yml b/pkg/db/fixtures/api_tokens.yml index 1a0f38b4a96..fae07325698 100644 --- a/pkg/db/fixtures/api_tokens.yml +++ b/pkg/db/fixtures/api_tokens.yml @@ -7,7 +7,6 @@ expires_at: 2099-01-01 00:00:00 owner_id: 1 created: 2023-09-01 07:00:00 - updated: 2023-09-01 07:00:00 # token in plaintext is tk_2eef46f40ebab3304919ab2e7e39993f75f29d2e - id: 2 title: 'test token 2' @@ -18,7 +17,6 @@ expires_at: 2023-01-01 00:00:00 owner_id: 1 created: 2023-09-01 07:00:00 - updated: 2023-09-01 07:00:00 # token in plaintext is tk_a5e6f92ddbad68f49ee2c63e52174db0235008c8 - id: 3 title: 'test token 3' @@ -29,5 +27,4 @@ expires_at: 2099-01-01 00:00:00 owner_id: 2 created: 2023-09-01 07:00:00 - updated: 2023-09-01 07:00:00 # token in plaintext is tk_5e29ae2ae079781ff73b0a3e0fe4d75a0b8dcb7c diff --git a/pkg/migration/20230831155832.go b/pkg/migration/20230831155832.go index 0eb616345bb..19157c7674a 100644 --- a/pkg/migration/20230831155832.go +++ b/pkg/migration/20230831155832.go @@ -31,9 +31,8 @@ type apiTokens20230831155832 struct { TokenLastEight string `xorm:"not null index varchar(8)" json:"-"` Permissions map[string][]string `xorm:"json not null" json:"permissions"` ExpiresAt time.Time `xorm:"not null" json:"expires_at"` - Created time.Time `xorm:"created not null" json:"created"` - Updated time.Time `xorm:"updated not null" json:"updated"` OwnerID int64 `xorm:"bigint not null" json:"-"` + Created time.Time `xorm:"created not null" json:"created"` } func (apiTokens20230831155832) TableName() string { diff --git a/pkg/models/api_routes.go b/pkg/models/api_routes.go index 4336a8b8fa7..fba08dcd9ad 100644 --- a/pkg/models/api_routes.go +++ b/pkg/models/api_routes.go @@ -121,7 +121,7 @@ func CollectRoutesForAPITokenUsage(route echo.Route) { // @tags api // @Produce json // @Security JWTKeyAuth -// @Success 200 {array} routes.APITokenRoute "The list of all routes." +// @Success 200 {array} models.APITokenRoute "The list of all routes." // @Router /routes [get] func GetAvailableAPIRoutesForToken(c echo.Context) error { return c.JSON(http.StatusOK, apiTokenRoutes) diff --git a/pkg/models/api_tokens.go b/pkg/models/api_tokens.go index b1a4c98efa6..c3952b7b722 100644 --- a/pkg/models/api_tokens.go +++ b/pkg/models/api_tokens.go @@ -51,8 +51,6 @@ type APIToken struct { // A timestamp when this api key was created. You cannot change this value. Created time.Time `xorm:"created not null" json:"created"` - // A timestamp when this api key was last updated. You cannot change this value. - Updated time.Time `xorm:"updated not null" json:"updated"` OwnerID int64 `xorm:"bigint not null" json:"-"`