Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
rattrap committed Jul 1, 2024
2 parents 01323aa + 60f227b commit b282c1c
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion services/client/src/pages/PoolDetails/PoolDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ export const PoolDetails = () => {
<CategoryTitle>
👑
<Text fontWeight="700" fontSize="1.25rem" lineHeight="26px">
Weekly Leaderboard
Leaderboard
</Text>
</CategoryTitle>
{leaderRewards?.length > 0 && (
Expand Down
4 changes: 2 additions & 2 deletions services/hype-backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
"test:cov": "jest --coverage",
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
"test:e2e": "jest --runInBand --config ./test/jest-e2e.json",
"typeorm": "yarn typeorm-ts-node-esm -d data-source.ts",
"typeorm": "yarn typeorm-ts-node-commonjs -d data-source.ts",
"typeorm:run": "yarn typeorm migration:run",
"typeorm:prod": "yarn typeorm-ts-node-esm -d dist/data-source.js",
"typeorm:prod": "yarn typeorm-ts-node-commonjs -d dist/data-source.js",
"typeorm:prod:run": "yarn typeorm:prod migration:run",
"typeorm:drop": "yarn typeorm schema:drop",
"typeorm:revert": "yarn typeorm migration:revert",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ export class IngesterService implements OnModuleInit {
}
const weekStart = DateTime.local()
.startOf('week')
.set({ weekday: 0 }) // Sunday
.set({ weekday: 7 }) // Sunday
.toJSDate();

for (const chatInfo of chatInfos) {
Expand Down
38 changes: 19 additions & 19 deletions services/hype-backend/src/modules/reward/reward.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -378,17 +378,17 @@ export class RewardService {
}

async getLeaderboard(poolId: string): Promise<TopTelegramAccountDto[]> {
const currentDate = DateTime.utc();
const startDate = currentDate
.startOf('week')
.minus({ days: 1 })
.set({ hour: 0, minute: 0, second: 0, millisecond: 0 })
.toJSDate();
const endDate = currentDate
.endOf('week')
.minus({ days: 1 })
.set({ hour: 23, minute: 59, second: 59, millisecond: 999 })
.toJSDate();
// const currentDate = DateTime.utc();
// const startDate = currentDate
// .startOf('week')
// .minus({ days: 1 })
// .set({ hour: 0, minute: 0, second: 0, millisecond: 0 })
// .toJSDate();
// const endDate = currentDate
// .endOf('week')
// .minus({ days: 1 })
// .set({ hour: 23, minute: 59, second: 59, millisecond: 999 })
// .toJSDate();

const qb = this.rewardRepository
.createQueryBuilder('reward')
Expand All @@ -407,14 +407,14 @@ export class RewardService {
.andWhere(
'(reward.telegramUsername IS NOT NULL OR reward.telegramId IS NOT NULL)',
)
.andWhere('reward.date_from BETWEEN :startDate AND :endDate', {
startDate,
endDate,
})
.andWhere('reward.date_to BETWEEN :startDate AND :endDate', {
startDate,
endDate,
})
// .andWhere('reward.date_from BETWEEN :startDate AND :endDate', {
// startDate,
// endDate,
// })
// .andWhere('reward.date_to BETWEEN :startDate AND :endDate', {
// startDate,
// endDate,
// })
.andWhere('reward.isBonus = :isBonus', { isBonus: false })
.groupBy('reward.telegramId, reward.telegramUsername')
.orderBy('"totalImpressions"', 'DESC')
Expand Down

0 comments on commit b282c1c

Please sign in to comment.