Skip to content

Commit

Permalink
some checks
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsan-g committed Sep 7, 2024
1 parent 6213d09 commit db74296
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/features/need/need.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ export class NeedController {
}

// 0- Fetch only active SW + NGO
const swIds = await this.userService
const activeSwIds = await this.userService
.getFlaskSwIds()
.then((r) => r.filter((s) => s.is_active).map((s) => s.id));

Expand All @@ -315,7 +315,7 @@ export class NeedController {
if (expired) {
const notConfirmed = await this.needService.getNotConfirmedNeeds(
null,
swIds,
activeSwIds,
ngoIds,
);
const myList = [];
Expand Down
6 changes: 3 additions & 3 deletions src/features/schedule/schedule.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export class ScheduleService {
this.logger.debug(
'Sending user Campaigns at 01:00 PM, only on Thursdays',
);
await this.campaignService.sendUserMonthlyCampaigns();
// await this.campaignService.sendUserMonthlyCampaigns();
}
}

Expand Down Expand Up @@ -175,10 +175,10 @@ export class ScheduleService {
}

@Cron('00 10 * * *', {
name: 'Reminders to announce arrivals At 10:00 everyday.',
name: 'Backup.',
timeZone: 'Asia/Tehran',
})
async handleNeedConfirmCron() {
async handleBackupCron() {
if (process.env.NODE_ENV === 'development') {
this.logger.debug('Backing up data base ...');

Expand Down
2 changes: 2 additions & 0 deletions src/utils/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ export function isAuthenticated(
if (!dappAuthentication || dappAuthentication.isExpired === true) {
return false;
} else {
console.log('Authenticated...');
return true;
}
} else {
Expand All @@ -154,6 +155,7 @@ export function isAuthenticated(
if (!panelAuthentication || panelAuthentication.isExpired === true) {
return false;
} else {
console.log('Authenticated...');
return true;
}
}
Expand Down

0 comments on commit db74296

Please sign in to comment.