Skip to content

Commit

Permalink
Merge pull request #548 from traPtitech/replace-openbd-to-ndl
Browse files Browse the repository at this point in the history
起動時にOpenBDのURLをNdlに書き換えるように修正
  • Loading branch information
cp-20 authored Dec 4, 2023
2 parents 019c065 + 0a1b6ee commit 69b5126
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 69b5126

Please sign in to comment.