Use party.id to query embed image instead of shortcode

The API doesn't understand shortcodes as indexes
This commit is contained in:
Justin Edmund 2025-01-18 09:30:43 -08:00
parent 0dc03d44f3
commit 023fd879f9
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?: {}) {