feat: the format of key is now constant with that of OpenAI

This commit is contained in:
JustSong
2023-06-03 10:53:25 +08:00
parent 98f1a627f0
commit 2847a08852
4 changed files with 29 additions and 4 deletions

View File

@@ -119,7 +119,7 @@ func AddToken(c *gin.Context) {
cleanToken := model.Token{
UserId: c.GetInt("id"),
Name: token.Name,
Key: common.GetUUID(),
Key: common.GenerateKey(),
CreatedTime: common.GetTimestamp(),
AccessedTime: common.GetTimestamp(),
ExpiredTime: token.ExpiredTime,