Skip to content

Commit

Permalink
feat: 更新工具异步获取图标 Mereithhh#3
Browse files Browse the repository at this point in the history
  • Loading branch information
Mereithhh committed Feb 15, 2023
1 parent c2ec53f commit d03d014
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,11 +315,12 @@ func UpdateToolHandler(c *gin.Context) {
})
return
}
updateTool(data, db)
if data.Logo == "" {
fmt.Println(data.Name, " 获取 logo: ", data.Logo)
data.Logo = getIcon(data.Url)
go LazyFetchLogo(data.Url, int64(data.Id), db)
}
updateTool(data, db)

c.JSON(200, gin.H{
"success": true,
"message": "更新成功",
Expand Down

0 comments on commit d03d014

Please sign in to comment.