Use party.id to query embed image instead of shortcode (#422)

The API doesn't understand shortcodes as indexes
This commit is contained in:
Justin Edmund 2025-01-18 09:30:59 -08:00 committed by GitHub
parent 0dc03d44f3
commit 2628d1745b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View file

@ -19,7 +19,7 @@ const PartyHead = ({ party, meta }: Props) => {
const router = useRouter()
const locale =
router.locale && ['en', 'ja'].includes(router.locale) ? router.locale : 'en'
const previewUrl = api.previewUrl(party.shortcode)
const previewUrl = api.previewUrl(party.id)
return (
<Head>

View file

@ -139,8 +139,8 @@ class Api {
return axios.get(resourceUrl, params)
}
previewUrl(shortcode: string): string {
return `${this.url}/parties/${shortcode}/preview`
previewUrl(id: string): string {
return `${this.url}/parties/${id}/preview`
}
raidGroups(params?: {}) {