chore: add test code for fix role icon url of db

This commit is contained in:
RockYang 2023-06-29 08:58:19 +08:00
parent 7eb8c5ec35
commit 43c1de51f5

View File

@ -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":