-
Notifications
You must be signed in to change notification settings - Fork 0
PM-1257 - handle wipro users payout #61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { Injectable } from '@nestjs/common'; | ||
import { BadRequestException, Injectable } from '@nestjs/common'; | ||
import { UserInfo } from 'src/dto/user.dto'; | ||
import { TrolleyService as Trolley } from 'src/shared/global/trolley.service'; | ||
import { PrismaService } from 'src/shared/global/prisma.service'; | ||
|
@@ -157,6 +157,12 @@ export class TrolleyService { | |
* @returns A URL string to the Trolley user portal. | ||
*/ | ||
async getPortalUrlForUser(user: UserInfo) { | ||
if (user.email.toLowerCase().indexOf('@wipro.com') > -1) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. medium |
||
throw new BadRequestException( | ||
'Please contact Topgear support to withdrawal your payments', | ||
); | ||
} | ||
|
||
const recipient = await this.getPayeeRecipient(user); | ||
const link = this.trolley.getRecipientPortalUrl({ | ||
email: user.email, | ||
|
Uh oh!
There was an error while loading. Please reload this page.