fix: return JSON body from send-otp endpoint
Flutter client calls jsonDecode on response body — empty void response throws FormatException even when SMS was sent successfully. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
a067e5d260
commit
5c740420e9
@@ -55,8 +55,9 @@ export class AuthController {
|
||||
}
|
||||
|
||||
@Post('send-otp')
|
||||
sendOtp(@Body() dto: SendOtpDto) {
|
||||
return this.auth.sendPhoneOtp(dto.phone);
|
||||
async sendOtp(@Body() dto: SendOtpDto) {
|
||||
await this.auth.sendPhoneOtp(dto.phone);
|
||||
return { ok: true };
|
||||
}
|
||||
|
||||
@Post('phone')
|
||||
|
||||
Reference in New Issue
Block a user