remove restId
This commit is contained in:
@@ -30,7 +30,4 @@ export class CreateScheduleDto {
|
||||
@Type(() => Boolean)
|
||||
isActive?: boolean;
|
||||
|
||||
@ApiProperty({ example: 'rest-ulid-123', description: 'شناسه رستوران' })
|
||||
@IsString()
|
||||
restId!: string;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ export class ScheduleService {
|
||||
openTime: createScheduleDto.openTime,
|
||||
closeTime: createScheduleDto.closeTime,
|
||||
isActive: createScheduleDto.isActive ?? true,
|
||||
restId: createScheduleDto.restId,
|
||||
restId: '01KA35CFFN0F6VA04DF0W6KCE3',
|
||||
};
|
||||
|
||||
const schedule = this.scheduleRepository.create(data);
|
||||
@@ -61,9 +61,9 @@ export class ScheduleService {
|
||||
if (updateScheduleDto.isActive !== undefined) {
|
||||
updateData.isActive = updateScheduleDto.isActive;
|
||||
}
|
||||
if (updateScheduleDto.restId) {
|
||||
updateData.restId = updateScheduleDto.restId;
|
||||
}
|
||||
// if (updateScheduleDto.restId) {
|
||||
// updateData.restId = updateScheduleDto.restId;
|
||||
// }
|
||||
|
||||
this.em.assign(schedule, updateData);
|
||||
await this.em.persistAndFlush(schedule);
|
||||
|
||||
Reference in New Issue
Block a user