shipment methods
This commit is contained in:
@@ -39,11 +39,12 @@ export class AdminService {
|
||||
|
||||
async createAdminForMyRestaurant(restId: string, dto: CreateMyRestaurantAdminDto) {
|
||||
const { phone, firstName, lastName, roleId } = dto;
|
||||
const currentAdmin = await this.adminRepository.findOne({
|
||||
let currentAdmin: Admin | null = null;
|
||||
currentAdmin = await this.adminRepository.findOne({
|
||||
phone,
|
||||
});
|
||||
});
|
||||
if (!currentAdmin) {
|
||||
await this.adminRepository.findOne({
|
||||
currentAdmin = await this.adminRepository.findOne({
|
||||
phone,
|
||||
firstName,
|
||||
lastName,
|
||||
|
||||
Reference in New Issue
Block a user