Skip to content
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

Staging #45

Merged
merged 8 commits into from
Jul 4, 2024
Merged
2 changes: 1 addition & 1 deletion src/app.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ import { Injectable } from '@nestjs/common';
@Injectable()
export class AppService {
getHello(): string {
return 'Hello World! Updated? Yes of Course!!';
return 'Hello World!';
}
}
8 changes: 4 additions & 4 deletions src/user/users.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { verifySignature } from 'src/utils/badges';
import { PrismaService } from 'src/prisma.service';
import { AuthGuard } from 'src/auth/auth.guard';
import { Prisma } from '@prisma/client';
import { snapshotPoints } from 'src/utils/badges/snapshot';
import { snapshots } from 'src/utils/badges/snapshot';

@Controller({ path: 'user' })
export class UsersController {
Expand Down Expand Up @@ -62,7 +62,7 @@ export class UsersController {
if (user.identity?.valueOf() || user.badges?.valueOf() || user.opAddress)
throw new ForbiddenException('User has already connected');

const badges = await getBadges(snapshotPoints, mainAddress);
const badges = await getBadges(snapshots, mainAddress);

try {
await this.prismaService.user.update({
Expand Down Expand Up @@ -102,7 +102,7 @@ export class UsersController {
)
throw new UnauthorizedException('Signature invalid');

const badges = await getBadges(snapshotPoints, mainAddress);
const badges = await getBadges(snapshots, mainAddress);

const user = await this.prismaService.user.findUnique({
select: { badges: true, identity: true },
Expand Down Expand Up @@ -175,7 +175,7 @@ export class UsersController {

@Get('/public/badges')
async getPublicBadges(@Query() { address }: GetBadgesDTO) {
const badges = await getBadges(snapshotPoints, address);
const badges = await getBadges(snapshots, address);

return badges || {};
}
Expand Down
Loading