Skip to content

Commit

Permalink
起動時にOpenBDのURLをNdlに書き換えるように修正
Browse files Browse the repository at this point in the history
  • Loading branch information
s9-sukyu committed Dec 4, 2023
1 parent 019c065 commit 0a1b6ee
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions model/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,8 @@ func Migrate() error {
}
}

// https://cover.openbd.jp/xxx.jpg -> https://iss.ndl.go.jp/thumbnail/xxx
db.Exec("UPDATE items SET img_url=REPLACE(REPLACE(img_url, '.jpg', ''), 'https://cover.openbd.jp/', 'https://iss.ndl.go.jp/thumbnail/') WHERE img_url LIKE 'https://cover.openbd.jp/%'")

return nil
}

0 comments on commit 0a1b6ee

Please sign in to comment.