Skip to content

Commit

Permalink
fix: fix mix uploads
Browse files Browse the repository at this point in the history
  • Loading branch information
Snazzah committed Sep 7, 2023
1 parent 1cf3a5a commit 7998812
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/dashboard/pages/api/user/drive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ export default async (req: NextApiRequest, res: NextApiResponse) => {
if (format !== 'flac' && container === 'aupzip') return res.status(400).send({ error: 'Invalid combination' });

if (container === 'mix' && !['flac', 'vorbis', 'aac'].includes(format)) return res.status(400).send({ error: 'Invalid combination' });
if (container === 'mix' && !(dbUser.rewardTier >= 20 || dbUser.rewardTier === -1)) return res.status(400).send({ error: 'User is not a Better Supporter ($4 tier)' });
if (container === 'mix' && !(dbUser.rewardTier >= 20 || dbUser.rewardTier === -1))
return res.status(400).send({ error: 'User is not a Better Supporter ($4 tier)' });

if (typeof enabled !== 'boolean') return res.status(400).send({ error: 'Invalid enabled state' });

Expand Down
1 change: 1 addition & 0 deletions apps/dashboard/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ export default function Index(props: Props) {
full
selected={driveFormat}
onSelect={setDriveFormat}
tier={props.rewardTier}
/>
</>
)}
Expand Down

0 comments on commit 7998812

Please sign in to comment.