From 2eed36bdd766fb0c027adae41864d31c8a2ddf13 Mon Sep 17 00:00:00 2001 From: Chip Wasson Date: Tue, 2 Apr 2024 16:46:01 -0600 Subject: [PATCH] Add ability to mark PoW complete --- src/pow/pow.controller.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/pow/pow.controller.ts b/src/pow/pow.controller.ts index da27fbf..6025148 100644 --- a/src/pow/pow.controller.ts +++ b/src/pow/pow.controller.ts @@ -21,4 +21,10 @@ export class PowController { return this.powService.verifyChallenge(body.challenge, body.proof); } + @Post('challenge/complete') + @ApiBody({ schema: { properties: { challenge: { type: 'string' } } } }) + async markChallengeAsComplete(@Body() body: { challenge: string }) { + return this.powService.markChallengeAsComplete(body.challenge); + } + }