pearlgw месяцев назад: 2
Родитель
Сommit
4457e4e373
1 измененных файлов с 0 добавлено и 20 удалено
  1. 0 20
      src/services/sales/HospitalService.js

+ 0 - 20
src/services/sales/HospitalService.js

@@ -218,35 +218,15 @@ exports.updateHospitalService = async (validateData, id, req) => {
218 218
         );
219 219
     }
220 220
 
221
-<<<<<<< HEAD
222
-    let existingHospital = null;
223
-
224
-    if (validateData.name && validateData.city_id) {
225
-        existingHospital = await prisma.hospital.findFirst({
226
-=======
227 221
     if (validateData.name && validateData.city_id) {
228 222
         const existingHospital = await prisma.hospital.findFirst({
229
->>>>>>> update_fitur_sales
230 223
             where: {
231 224
                 name: validateData.name,
232 225
                 city_id: validateData.city_id,
233 226
                 deletedAt: null,
234
-<<<<<<< HEAD
235
-                // NOT: {
236
-                //     id: id,
237
-                // }
238
-            }
239
-        });
240
-
241
-        if (existingHospital) {
242
-            throw new HttpException('Hospital with same name in this city already exists', 400);
243
-        }
244
-    }
245
-=======
246 227
                 NOT: { id }
247 228
             }
248 229
         });
249
->>>>>>> update_fitur_sales
250 230
 
251 231
         if (existingHospital) {
252 232
             throw new HttpException('Hospital with same name in this city already exists', 400);