Skip to content

Commit

Permalink
feat: check unclaimed
Browse files Browse the repository at this point in the history
  • Loading branch information
KieSun committed May 20, 2024
1 parent 7af5b44 commit 6395ac9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@
"eslint-plugin-prettier": "^4.2.1",
"jest": "^29.5.0",
"prettier": "^2.8.8",
"prettier-plugin-organize-imports": "^3.2.3",
"source-map-support": "^0.5.21",
"supertest": "^6.3.3",
"ts-jest": "^29.1.0",
"ts-loader": "^9.4.3",
"ts-node": "^10.9.1",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.1.3",
"prettier-plugin-organize-imports": "^3.2.3"
"typescript": "^5.1.3"
},
"jest": {
"moduleFileExtensions": [
Expand Down
2 changes: 2 additions & 0 deletions src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ import { UserModule } from '@/src/module/user.module';
import { Logger, MiddlewareConsumer, Module } from '@nestjs/common';
import { ConfigModule } from '@nestjs/config';
import { APP_FILTER } from '@nestjs/core';
import { ScheduleModule } from '@nestjs/schedule';
import { PrismaModule, loggingMiddleware } from 'nestjs-prisma';
import { ProjectModule } from './module/project.module';

@Module({
imports: [
ScheduleModule.forRoot(),
ConfigModule.forRoot({
isGlobal: true,
}),
Expand Down
6 changes: 3 additions & 3 deletions src/controller/contribution.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ export class ContributionController {
return CoreApiResponse.success(data);
}

@Get('test')
async test(@Query('chainId') chainId: number) {
const data = await this.contributionService.test(chainId);
@Get('syncUnClaimed')
async syncUnClaimed(@Query('chainId') chainId: number) {
const data = await this.contributionService.syncUnClaimed(chainId);
return CoreApiResponse.success(data);
}
}
2 changes: 1 addition & 1 deletion src/core/service/contribution.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ export class ContributionService {
return data;
}

async test(chainId: number) {
async syncUnClaimed(chainId: number) {
const ids = await this.easService.getEASList(chainId);
const data = await this.prisma.contribution.findMany({
where: {
Expand Down

0 comments on commit 6395ac9

Please sign in to comment.