chore(api tokens): remove updated date from tokens as it can't be updated anyway
This commit is contained in:
parent
8f3d18a809
commit
e3c5a93f4f
@ -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
|
||||
|
@ -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 {
|
||||
|
@ -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)
|
||||
|
@ -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:"-"`
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user