Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

新增共享无法生成 fk #81

Open
Cranberrycrisp opened this issue May 25, 2024 · 3 comments
Open

新增共享无法生成 fk #81

Cranberrycrisp opened this issue May 25, 2024 · 3 comments

Comments

@Cranberrycrisp
Copy link

Cranberrycrisp commented May 25, 2024

image
image

场景:
列表中的四个共享,第一个是由helper生成的,第二个是我手动生成并填入数据库的。测试新增了很多次,Share Token都为空。
也就是说只有第一次使用正常生成了fk

环境:
Debian 11 IP地址美国

日志:

{"level":"info","ts":1716603143.6625288,"caller":"middleware/log.go:31","msg":"Request","trace":"dde7db7887eeb9907beb3941826978f3","request_method":"POST","request_url":"/api/share/add","request_params":"{\"shareToken\":\"\",\"accountId\":1,\"uniqueName\":\"test\",\"password\":\"test123\",\"expiresIn\":0,\"siteLimit\":\"\",\"gpt35Limit\":-1,\"gpt4Limit\":-1,\"refreshEveryday\":true,\"showUserinfo\":true,\"showConversations\":true,\"temporaryChat\":true,\"comment\":\"\"}"}

2024/05/25 10:12:23 D:/go/goProjects/PandoraHelper/internal/repository/account.go:58
[0.397ms] [rows:3] SELECT * FROM `share` WHERE `share`.`account_id` = 1

2024/05/25 10:12:23 D:/go/goProjects/PandoraHelper/internal/repository/account.go:58
[2.134ms] [rows:1] SELECT * FROM `account` WHERE id = 1 ORDER BY `account`.`id` LIMIT 1
{"level":"info","ts":1716603143.7439528,"caller":"service/share.go:141","msg":"RefreshShareToken resp","resp":{"token_key":""}}

2024/05/25 10:12:23 D:/go/goProjects/PandoraHelper/internal/repository/share.go:45
[3.947ms] [rows:1] INSERT INTO `share` (`account_id`,`unique_name`,`password`,`share_token`,`comment`,`expires_in`,`site_limit`,`gpt4_limit`,`gpt35_limit`,`show_userinfo`,`show_conversations`,`refresh_everyday`,`temporary_chat`) VALUES (1,"test","test123","","",0,"",-1,-1,true,true,true,true) RETURNING `id`
{"level":"info","ts":1716603143.7482283,"caller":"middleware/log.go:42","msg":"Response","trace":"dde7db7887eeb9907beb3941826978f3","request_method":"POST","request_url":"/api/share/add","request_params":"{\"shareToken\":\"\",\"accountId\":1,\"uniqueName\":\"test\",\"password\":\"test123\",\"expiresIn\":0,\"siteLimit\":\"\",\"gpt35Limit\":-1,\"gpt4Limit\":-1,\"refreshEveryday\":true,\"showUserinfo\":true,\"showConversations\":true,\"temporaryChat\":true,\"comment\":\"\"}","UserId":"1","time":"86.007849ms"}
@nianhua99
Copy link
Owner

uniquename 是不是重复了

@Cranberrycrisp
Copy link
Author

uniquename 是不是重复了

不重复的也一样

@all-is-nail
Copy link

我也遇到的同样的问题。部分账号新建的共享账号未生成share token

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants