mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-14 00:26:51 +08:00
18 lines
424 B
TypeScript
18 lines
424 B
TypeScript
import { Controller, Get } from '@nestjs/common';
|
|
|
|
import { Throttle } from '../../base';
|
|
import { Public } from '../../core/auth';
|
|
import { CaptchaService } from './service';
|
|
|
|
@Throttle('strict')
|
|
@Controller('/api/auth')
|
|
export class CaptchaController {
|
|
constructor(private readonly captcha: CaptchaService) {}
|
|
|
|
@Public()
|
|
@Get('/challenge')
|
|
async getChallenge() {
|
|
return this.captcha.getChallengeToken();
|
|
}
|
|
}
|