Skip to content

Commit

Permalink
Remove vestigial patreon dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
jptrsn committed Feb 5, 2025
1 parent fbd950c commit 5fb2fd9
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@ export class AzureSttController {
async getSpeechToken(@Req() req): Promise<{token: string; region: string}> {
const user = await this.userService.findOne({ id: req.user.id });
if (!user) {
throw new HttpException(`User not found`, HttpStatus.NOT_FOUND)
throw new HttpException(`User not found`, HttpStatus.NOT_FOUND);
}
const supporter = await this.supporterService.findOne({ email: user.primaryEmail });
if (!supporter || !supporter.amountCents) {
throw new HttpException(`User is not a supporter`, HttpStatus.BAD_REQUEST);
if (!user.creditBalance) {
throw new HttpException(`Unauthorized`, HttpStatus.UNAUTHORIZED);
}
return this.azureSttService.getToken();
}
Expand Down

0 comments on commit 5fb2fd9

Please sign in to comment.