Add public homepage subscribe endpoint for newsletter phone capture.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
ff291448f3
commit
88f6a430d9
@@ -1,4 +1,5 @@
|
||||
import { Controller, Get, Param, ParseIntPipe, Query } from '@nestjs/common';
|
||||
import { Body, Controller, Get, Param, ParseIntPipe, Post, Query } from '@nestjs/common';
|
||||
import { SubscribeDto } from './dto/subscribe.dto';
|
||||
import { PublicService } from './public.service';
|
||||
|
||||
@Controller('public')
|
||||
@@ -78,4 +79,9 @@ export class PublicController {
|
||||
listWebsiteSlots(@Query('storeSlug') storeSlug?: string) {
|
||||
return this.publicService.listWebsiteSlots(storeSlug);
|
||||
}
|
||||
|
||||
@Post('subscribe')
|
||||
subscribe(@Body() dto: SubscribeDto) {
|
||||
return this.publicService.subscribe(dto.cellNumber);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user