mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-09-18 09:16:39 +08:00
chore: add test code for fix role icon url of db
This commit is contained in:
parent
7eb8c5ec35
commit
43c1de51f5
@ -113,9 +113,12 @@ func (h *ManagerHandler) Migrate(c *gin.Context) {
|
||||
var message []model.HistoryMessage
|
||||
h.db.Find(&message)
|
||||
for _, r := range message {
|
||||
if !strings.HasPrefix(r.Icon, "/") {
|
||||
r.Icon = "/" + r.Icon
|
||||
h.db.Updates(&r)
|
||||
}
|
||||
|
||||
}
|
||||
break
|
||||
|
||||
case "avatar":
|
||||
|
Loading…
Reference in New Issue
Block a user