auth fix 2
This commit is contained in:
parent
da3051fe5e
commit
82ac15af6f
@ -187,7 +187,7 @@ export class AuthController {
|
||||
}
|
||||
|
||||
@UseGuards(JwtAuthGuard, RolesGuard)
|
||||
@Roles('sa')
|
||||
@Roles('ua', 'sa', 'ca')
|
||||
@Post('1/sendmail')
|
||||
@HttpCode(200)
|
||||
async sendMaila(@Body() body: SendMailDTO, @Req() req: Request) {
|
||||
@ -204,7 +204,7 @@ export class AuthController {
|
||||
|
||||
|
||||
@UseGuards(JwtAuthGuard, RolesGuard)
|
||||
@Roles('psa')
|
||||
@Roles('pua','psa','pca')
|
||||
@Post('2/sendmail')
|
||||
@HttpCode(200)
|
||||
async sendMailb(@Body() body: SendMailDTO, @Req() req: Request) {
|
||||
|
||||
@ -539,34 +539,34 @@ export class UserMaintenanceService {
|
||||
const reducedRows = mappedRows.reduce((acc, curr) => {
|
||||
let existing;
|
||||
|
||||
if (curr.Service_Provider_Name && curr.SPID) {
|
||||
if (curr.SERVICE_PROVIDER_NAME && curr.SPID) {
|
||||
existing = acc.find(
|
||||
(item) =>
|
||||
item.Service_Provider_Name === curr.Service_Provider_Name &&
|
||||
item.SERVICE_PROVIDER_NAME === curr.SERVICE_PROVIDER_NAME &&
|
||||
item.SPID === curr.SPID
|
||||
);
|
||||
} else if (curr.Preparer_Name && curr.CLIENTID) {
|
||||
} else if (curr.PREPARER_NAME && curr.CLIENTID) {
|
||||
existing = acc.find(
|
||||
(item) =>
|
||||
item.Preparer_Name === curr.Preparer_Name &&
|
||||
item.PREPARER_NAME === curr.PREPARER_NAME &&
|
||||
item.CLIENTID === curr.CLIENTID
|
||||
);
|
||||
}
|
||||
|
||||
if (existing) {
|
||||
existing.CARNETSTATUS.push(curr.CARNETSTATUS);
|
||||
existing.Carnet_Count.push(curr.Carnet_Count);
|
||||
existing.CARNET_COUNT.push(curr.CARNET_COUNT);
|
||||
} else {
|
||||
const newItem = {
|
||||
CARNETSTATUS: [curr.CARNETSTATUS],
|
||||
Carnet_Count: [curr.Carnet_Count],
|
||||
Carnet_Count: [curr.CARNET_COUNT],
|
||||
};
|
||||
|
||||
if (curr.Service_Provider_Name && curr.SPID) {
|
||||
newItem['Service_Provider_Name'] = curr.Service_Provider_Name;
|
||||
if (curr.SERVICE_PROVIDER_NAME && curr.SPID) {
|
||||
newItem['SERVICE_PROVIDER_NAME'] = curr.SERVICE_PROVIDER_NAME;
|
||||
newItem['SPID'] = curr.SPID;
|
||||
} else if (curr.Preparer_Name && curr.CLIENTID) {
|
||||
newItem['Preparer_Name'] = curr.Preparer_Name;
|
||||
} else if (curr.PREPARER_NAME && curr.CLIENTID) {
|
||||
newItem['PREPARER_NAME'] = curr.PREPARER_NAME;
|
||||
newItem['CLIENTID'] = curr.CLIENTID;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user