Fix ethos licensing notifications array type casting both occurrences
cgen-db4c4bf1a0d64222b92eaca45669aee1
This commit is contained in:
parent
ba8120ab38
commit
8931e66bdf
1 changed files with 6 additions and 6 deletions
|
|
@ -71,9 +71,9 @@ export default async function handler(req: any, res: any) {
|
||||||
return res.status(404).json({ error: "Agreement not found" });
|
return res.status(404).json({ error: "Agreement not found" });
|
||||||
}
|
}
|
||||||
|
|
||||||
const artist = agreement.ethos_tracks?.user_profiles?.[0];
|
const artist = (agreement as any).ethos_tracks?.user_profiles?.[0];
|
||||||
const licensee = agreement.user_profiles?.[0];
|
const licensee = (agreement as any).user_profiles?.[0];
|
||||||
const trackTitle = agreement.ethos_tracks?.title;
|
const trackTitle = (agreement as any).ethos_tracks?.title;
|
||||||
|
|
||||||
if (!artist?.email) {
|
if (!artist?.email) {
|
||||||
return res.status(400).json({ error: "Artist email not found" });
|
return res.status(400).json({ error: "Artist email not found" });
|
||||||
|
|
@ -140,9 +140,9 @@ export default async function handler(req: any, res: any) {
|
||||||
return res.status(404).json({ error: "Agreement not found" });
|
return res.status(404).json({ error: "Agreement not found" });
|
||||||
}
|
}
|
||||||
|
|
||||||
const artist = agreement.ethos_tracks?.user_profiles?.[0];
|
const artist = (agreement as any).ethos_tracks?.user_profiles?.[0];
|
||||||
const licensee = agreement.user_profiles?.[0];
|
const licensee = (agreement as any).user_profiles?.[0];
|
||||||
const trackTitle = agreement.ethos_tracks?.title;
|
const trackTitle = (agreement as any).ethos_tracks?.title;
|
||||||
|
|
||||||
if (!artist?.email) {
|
if (!artist?.email) {
|
||||||
return res.status(400).json({ error: "Artist email not found" });
|
return res.status(400).json({ error: "Artist email not found" });
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue