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