Add business registration requests with approval flow, SMS notifications, and owner businesses endpoint.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -70,6 +70,14 @@ export class BusinessesService {
|
||||
return business;
|
||||
}
|
||||
|
||||
async findMine(ownerId: string): Promise<BusinessEntity[]> {
|
||||
return this.repo.find({
|
||||
where: { ownerId },
|
||||
relations: { category: true, images: true },
|
||||
order: { createdAt: 'DESC' },
|
||||
});
|
||||
}
|
||||
|
||||
async create(payload: CreateBusinessDto): Promise<BusinessEntity> {
|
||||
const slugTaken = await this.repo.findOne({ where: { slug: payload.slug } });
|
||||
if (slugTaken) {
|
||||
|
||||
Reference in New Issue
Block a user