From bd01a43a179bd3f230a019ba526e146a4a331c82 Mon Sep 17 00:00:00 2001 From: PritamIT2023 Date: Tue, 20 Feb 2024 10:46:28 +0530 Subject: [PATCH] fix: :fire: remove unused files fix model association and remove unused files Ref: #30 --- service/controllers/address.controller.ts | 50 ---- service/controllers/basic.controller.ts | 13 - service/controllers/doctor.controller.ts | 0 service/controllers/education.controller.ts | 0 service/controllers/experience.controller.ts | 0 service/controllers/profile.controller.ts | 5 +- service/functions/address.functions.ts | 294 ------------------- service/functions/basic.functions.ts | 68 ----- service/functions/doctor.functions.ts | 253 ---------------- service/functions/profile.function.ts | 38 +-- service/functions/profile.helper.ts | 0 service/functions/test.functions.ts | 100 ------- service/middlewares/test.middleware.ts | 9 - service/models/PersonAddresses.model.ts | 2 - service/tasks/TestTask.ts | 15 - 15 files changed, 20 insertions(+), 827 deletions(-) delete mode 100644 service/controllers/address.controller.ts delete mode 100644 service/controllers/basic.controller.ts delete mode 100644 service/controllers/doctor.controller.ts delete mode 100644 service/controllers/education.controller.ts delete mode 100644 service/controllers/experience.controller.ts delete mode 100644 service/functions/address.functions.ts delete mode 100644 service/functions/basic.functions.ts delete mode 100644 service/functions/doctor.functions.ts delete mode 100644 service/functions/profile.helper.ts delete mode 100644 service/functions/test.functions.ts delete mode 100644 service/middlewares/test.middleware.ts delete mode 100644 service/tasks/TestTask.ts diff --git a/service/controllers/address.controller.ts b/service/controllers/address.controller.ts deleted file mode 100644 index e77ef6d..0000000 --- a/service/controllers/address.controller.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* eslint-disable no-console */ -// eslint-disable-next-line no-undef -// import { databaseActions } from "@wrappid/service-core"; - -// eslint-disable-next-line no-undef -import { createAddress, updateAddress, /* deleteAddress */ } from "../functions/address.functions"; - -/** - * - * @param {*} req - * @param {*} res - */ -module.exports.createAddress = async (req, res) => { - try { - await createAddress(/* req, res, databaseActions */); - } catch (err) { - console.log(err); - res.status(500).json({ message: "Error to create person address" }); - } -}; - -/** - * - * @param {*} req - * @param {*} res - */ -module.exports.updateAddress = async (req, res) => { - try { - await updateAddress(/* req, res, databaseActions */); - } catch (err) { - console.log(err); - res.status(500).json({ message: "Error to update person address" }); - } -}; - -/** - * - * @param {*} req - * @param {*} res - */ -module.exports.deleteAddress = async (/* req, */ res) => { - try { - // const data = await deleteAddress(req, databaseActions); - - // res.status(data.status).json({ data: data?.data, message: data?.message }); - } catch (err) { - console.log(err); - res.status(500).json({ message: "Error to delete person address" }); - } -}; diff --git a/service/controllers/basic.controller.ts b/service/controllers/basic.controller.ts deleted file mode 100644 index b59b3e0..0000000 --- a/service/controllers/basic.controller.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* eslint-disable no-console */ -import { /* databaseActions, messageProcessor */ } from "@wrappid/service-core"; - -import {updateBasicDetails} from "../functions/basic.functions"; - -module.exports.updateBasicDetails = async (req, res) => { - try { - await updateBasicDetails(req, res, /* databaseActions */); - } catch (err) { - console.log(err); - res.status(500).json({ message: "unknown"/* messageProcessor(err) */ }); - } -}; diff --git a/service/controllers/doctor.controller.ts b/service/controllers/doctor.controller.ts deleted file mode 100644 index e69de29..0000000 diff --git a/service/controllers/education.controller.ts b/service/controllers/education.controller.ts deleted file mode 100644 index e69de29..0000000 diff --git a/service/controllers/experience.controller.ts b/service/controllers/experience.controller.ts deleted file mode 100644 index e69de29..0000000 diff --git a/service/controllers/profile.controller.ts b/service/controllers/profile.controller.ts index 4efbeb8..bc899b9 100644 --- a/service/controllers/profile.controller.ts +++ b/service/controllers/profile.controller.ts @@ -1,7 +1,4 @@ -/* eslint-disable no-unused-vars */ -/* eslint-disable id-length */ -/* eslint-disable no-console */ -/* eslint-disable no-undef */ +/* eslint-disable @typescript-eslint/no-explicit-any */ import * as profileFunction from "../functions/profile.function"; diff --git a/service/functions/address.functions.ts b/service/functions/address.functions.ts deleted file mode 100644 index addd14b..0000000 --- a/service/functions/address.functions.ts +++ /dev/null @@ -1,294 +0,0 @@ -import { - databaseProvider, - // deleteS3FIle, - // messageProcessor, - // getUrl, - // upload, - // entityStatus, -} from "@wrappid/service-core"; - -import { DEFAULT_DB } from "../constants/profile.constants"; - -/** - * - * @param {*} req - * @param {*} res - * @param {*} databaseActions - * @returns - */ -export const createAddress = async (/* req, res, databaseActions */) => { - try { - /* const del_urls = []; - const personId = req.params.id; */ - - /* await upload.fields([{ maxCount: 1, name: "clinicLogo" }])( - req, - res, - async function (err) { - try { - if (err) { - console.log("FIle Upload error", err); - throw err; - } else { - const data = req.body; - let file_url = null; - - if (req.files["clinicLogo"] && req.files["clinicLogo"][0]) { - file_url = await getUrl( - req.files["clinicLogo"][0].filename - ? req.files["clinicLogo"][0].filename - : req.files["clinicLogo"][0].key - ? req.files["clinicLogo"][0].key - : req.files["clinicLogo"][0].originalname - ); - data[""]; - } - - const result = - await databaseProvider.application.sequelize.transaction( - async (transaction) => { - const address = await databaseActions.findByPk( - DEFAULT_DB, - "AddressTypes", - data.addressTypeId - ); - const addDetail = await databaseActions.create( - DEFAULT_DB, - "PersonAddresses", - { - ...data, - _status: entityStatus.ACTIVE, - createdBy: req.user.userId, - personId: personId, - updatedBy: req.user.userId, - }, - { transaction } - ); - - let clinicDetail = {}; - - if (address?.type?.toLowerCase() === "clinic") { - clinicDetail = await databaseActions.create( - DEFAULT_DB, - "Clinics", - { - _status: entityStatus.ACTIVE, - createdBy: req.user.userId, - name: data.fullName, - personAddressId: addDetail.id, - photoUrl: file_url, - updatedBy: req.user.userId, - }, - { transaction } - ); - } - - return { - addressId: addDetail?.id, - clinicId: clinicDetail?.id, - }; - } - ); - - console.log("Address created", result); - res.status(200).json({ message: messageProcessor(200005) }); - } - } catch (err) { - console.log(err); - await deleteS3FIle(del_urls); - res.status(500).json({ message: messageProcessor(err) }); - } - } - ); */ - } catch (err) { - console.log(err); - // return { message: messageProcessor(err), status: 500 }; - } -}; - -/** - * - * @param {*} req - * @param {*} res - * @param {*} databaseActions - */ -export async function updateAddress(/* req, res, databaseActions */) { - try { - /* const del_urls = []; - const addressId = req.params.id; - let file_url = null; */ - - /* await upload.fields([{ maxCount: 1, name: "clinicLogo" }])( - req, - res, - async function (err) { - try { - if (err) { - console.log("FIle Upload error", err); - throw err; - } else { - const data = req.body; - - if (req.files["clinicLogo"] && req.files["clinicLogo"][0]) { - file_url = await getUrl( - req.files["clinicLogo"][0].filename - ? req.files["clinicLogo"][0].filename - : req.files["clinicLogo"][0].key - ? req.files["clinicLogo"][0].key - : req.files["clinicLogo"][0].originalname - ); - data[""]; - } - await databaseProvider.application.sequelize.transaction( - async (transaction) => { - const address = await databaseActions.findByPk( - DEFAULT_DB, - "PersonAddresses", - req.params.id, - { - include: [ - { - model: databaseProvider.application.models.AddressTypes, - }, - ], - } - ); - let updateInfo = await databaseActions.update( - DEFAULT_DB, - "PersonAddresses", - { - ...data, - updatedBy: req.user.userId, - }, - { - transaction, - where: { id: addressId }, - } - ); - - if (updateInfo[0] === 0) { - throw 290007; - } - - if (address?.AddressType?.type?.toLowerCase() === "clinic") { - console.log("Clinic Url", file_url); - const updateOb = { - name: data.fullName, - updatedBy: req.user.userId, - }; - - if (file_url) { - updateOb["photoUrl"] = file_url; - } - updateInfo = await databaseActions.update( - DEFAULT_DB, - "Clinics", - updateOb, - { - transaction, - where: { personAddressId: addressId }, - } - ); - - if (updateInfo === 0) { - throw 290008; - } - } - } - ); - - console.log("Registration detail created"); - res.status(200).json({ message: messageProcessor(200006) }); - } - } catch (err) { - console.log(err); - await deleteS3FIle(del_urls); - res.status(500).json({ message: messageProcessor(err) }); - } - } - ); */ - } catch (err) { - console.log(err); - // res.status(500).json({ message: messageProcessor(err) }); - } -} - -/** - * - * @param {*} req - * @param {*} databaseActions - * @returns - */ -export async function deleteAddress(req, databaseActions) { - try { - await databaseProvider.application.sequelize.transaction( - async (transaction) => { - const addressId = req.params.id; - const address = await databaseActions.findByPk( - DEFAULT_DB, - "PersonAddresses", - addressId, - { - include: [ - { model: databaseProvider.application.models.AddressTypes }, - ], - } - ); - - let updateInfo = await databaseActions.update( - DEFAULT_DB, - "PersonAddresses", - { - /** - * @todo needs to uncomment below line - */ - // _status: entityStatus.DELETED, - isActive: false, - updatedBy: req.user.userId, - }, - { - transaction, - where: { id: addressId }, - } - ); - - if (updateInfo[0] === 0) { - console.error("Error here address"); - throw 290009; - } - - if (address?.AddressType?.type?.toLowerCase() === "clinic") { - updateInfo = await databaseActions.update( - DEFAULT_DB, - "Clinics", - { - isActive: false, - updatedBy: req.user.userId, - }, - { - transaction, - where: { personAddressId: addressId }, - } - ); - - if (updateInfo[0] === 0) { - console.error("Error here clinic"); - throw 290009; - } - } - } - ); - - console.log("Address deleted: ", req.params.id); - // return { message: messageProcessor(200007), status: 200 }; - } catch (error) { - console.log("Address Delete error", error); - // return { message: messageProcessor(error), status: 500 }; - } -} - -module.exports = { - createAddress, - deleteAddress, - updateAddress, -}; diff --git a/service/functions/basic.functions.ts b/service/functions/basic.functions.ts deleted file mode 100644 index 06f7662..0000000 --- a/service/functions/basic.functions.ts +++ /dev/null @@ -1,68 +0,0 @@ -/* eslint-disable no-console */ -// import { /* deleteS3FIle, messageProcessor, getUrl, upload */ } from "@wrappid/service-core"; -// import { DEFAULT_DB } from "../constants/profile.constants"; - - - -/** - * - * @param {*} req - * @returns - */ -export const updateBasicDetails = async (req, res, /*databaseActions */) => { - try { - console.log(req); - - /* const del_urls = []; - let file_url = null; - const personId = req.params.id; */ - - /* await upload.fields([{ maxCount: 1, name: "photo" }])( - req, - res, - async function (err) { - try { - if (err) { - console.log("FIle Upload error", err); - throw err; - } else { - const data = req.body; - - if (data.extraInfo) data.extraInfo = JSON.parse(data.extraInfo); - if (data.bio) data["extraInfo"] = { bio: data.bio }; - if (req.files["photo"] && req.files["photo"][0]) { - file_url = await getUrl( - req.files["photo"][0].filename - ? req.files["photo"][0].filename - : req.files["photo"][0].key - ? req.files["photo"][0].key - : req.files["photo"][0].originalname - ); - del_urls.push(file_url); - data.photoUrl = file_url; - } - console.log("UPDATEING DATA", data); - - await databaseActions.update(DEFAULT_DB, "Persons", - { - ...data, - updatedBy: req.user.userId, - }, - { where: { id: personId } } - ); - - console.log("Basic detail updated"); - res.status(200).json({ message: messageProcessor(200004) }); - } - } catch (err) { - console.log(err); - await deleteS3FIle(del_urls); - res.status(500).json({ message: messageProcessor(err) }); - } - } - ); */ - } catch (err) { - console.log(err); - res.status(500).json({ message: "unknown"/* messageProcessor(err) */ }); - } -}; diff --git a/service/functions/doctor.functions.ts b/service/functions/doctor.functions.ts deleted file mode 100644 index cdbeded..0000000 --- a/service/functions/doctor.functions.ts +++ /dev/null @@ -1,253 +0,0 @@ -/* eslint-disable no-console */ -import { - databaseProvider, - deleteS3FIle, - messageProcessor, - getUrl, - upload, -} from "@wrappid/service-core"; - -import { DEFAULT_DB } from "../constants/profile.constants"; - -/** - * - * @param {*} req - * @returns - */ -const updateDoctorDetails = async (req, res, databaseActions) => { - try { - const del_urls = []; - let file_url = null; - const personId = req.params.id; - - await upload.fields([{ maxCount: 1, name: "registrationDocument" }])( - req, - res, - async function (err) { - try { - if (err) { - console.log("FIle Upload error", err); - throw err; - } else { - if ( - req.files["registrationDocument"] && - req.files["registrationDocument"][0] - ) { - file_url = await getUrl( - req.files["registrationDocument"][0].filename - ? req.files["registrationDocument"][0].filename - : req.files["registrationDocument"][0].key - ? req.files["registrationDocument"][0].key - : req.files["registrationDocument"][0].originalname - ); - } - console.log("File URL", file_url); - - const exists = await databaseActions.findOne( - DEFAULT_DB, - "DoctorDetails", - { where: { doctorId: req.params.id } } - ); - - del_urls.push(file_url); - - const data = req.body; - - await databaseProvider.action.sequelize.transaction( - async (transaction) => { - data.personDocs = []; - - if (!exists) { - console.log("Docotr details not found"); - await databaseActions.create( - DEFAULT_DB, - "DoctorDetails", - { - ...data, - doctorId: personId, - updatedBy: req.user.userId, - }, - { transaction } - ); - } else { - console.log("Docotr details found: ", exists.id); - } - - if (file_url) { - const updateInfo = await databaseActions.update( - DEFAULT_DB, - "PersonDocs", - { - docUrl: file_url, - updatedBy: req.user.userId, - }, - { - transaction, - where: { personId: personId }, - } - ); - - if (updateInfo === 0) { - const nPersonDocs = await databaseActions.create( - DEFAULT_DB, - "PersonDocs", - { - docUrl: file_url, - personId, - type: "Registration Document", - updatedBy: req.user.userId, - }, - { transaction } - ); - - console.log( - "Registration file entry made:", - nPersonDocs.id - ); - } else { - console.log("Registration file URL updated"); - } - } else { - console.log("No registration file given"); - } - - if (data.departmentId) { - await databaseActions.update( - DEFAULT_DB, - "Persons", - { - departmentId: data.departmentId, - updatedBy: req.user.userId, - }, - { - transaction, - where: { id: personId }, - } - ); - - console.log("Department updated"); - } - - await databaseActions.update( - DEFAULT_DB, - "DoctorDetails", - { - ...data, - updatedBy: req.user.userId, - }, - { - transaction, - where: { doctorId: personId }, - } - ); - } - ); - - console.log("Registration detail updated"); - res.status(200).json({ message: messageProcessor(200003) }); - } - } catch (err) { - console.log(err); - await deleteS3FIle(del_urls); - res.status(500).json({ message: messageProcessor(err) }); - } - } - ); - } catch (err) { - console.log(err); - res.status(500).json({ message: messageProcessor(err) }); - } -}; - -/** - * - * @param {*} req - * @returns - */ -const createDoctorDetails = async (req, res, databaseActions) => { - try { - const del_urls = []; - const personId = req.params.id; - - await upload.fields([{ maxCount: 1, name: "registrationDocument" }])( - req, - res, - async function (err) { - try { - if (err) { - console.log("FIle Upload error", err); - throw err; - } else { - if ( - req.files["registrationDocument"] && - req.files["registrationDocument"][0] - ) { - let file_url = null; - - file_url = await getUrl( - req.files["registrationDocument"][0].filename - ? req.files["registrationDocument"][0].filename - : req.files["registrationDocument"][0].key - ? req.files["registrationDocument"][0].key - : req.files["registrationDocument"][0].originalname - ); - - const doctorDetails = await databaseActions.findOne( - DEFAULT_DB, - "DoctorDetails", - { where: { personId: req.params.id } } - ); - - // eslint-disable-next-line no-undef - del_urls.push(url); - if (doctorDetails) { - throw 290004; - } - const data = req.body; - - // eslint-disable-next-line no-undef - await db.sequelize.transaction(async (transaction) => { - data.personDocs = []; - // eslint-disable-next-line no-undef - await db.PersonDocs.create( - { - createdBy: req.user.userId, - personId: personId, - type: "Registration Document", - updatedBy: req.user.userId, - url: file_url, - }, - { transaction: transaction } - ); - // eslint-disable-next-line no-undef - await db.DoctorDetails.create( - { - ...req.body, - createdBy: req.user.userId, - doctorId: personId, - updatedBy: req.user.userId, - }, - { transaction: transaction } - ); - }); - - console.log("Registration detail created"); - res.status(200).json({ message: messageProcessor(200002) }); - } else { - throw 290003; - } - } - } catch (err) { - console.log(err); - await deleteS3FIle(del_urls); - res.status(500).json({ message: messageProcessor(err) }); - } - } - ); - } catch (err) { - console.log(err); - res.status(500).json({ message: messageProcessor(err) }); - } -}; - -module.exports = { createDoctorDetails, updateDoctorDetails }; diff --git a/service/functions/profile.function.ts b/service/functions/profile.function.ts index 717158d..2b63a80 100644 --- a/service/functions/profile.function.ts +++ b/service/functions/profile.function.ts @@ -1,6 +1,6 @@ -/* eslint-disable no-console */ -/* eslint-disable no-unused-vars*/ - +/* eslint-disable no-unused-vars */ +/* eslint-disable @typescript-eslint/no-explicit-any */ +/* eslint-disable-next-line no-unused-vars */ import { databaseActions, databaseProvider, @@ -8,7 +8,6 @@ import { } from "@wrappid/service-core"; const getContactInfoFunc = async (req: any, res: any) => { - //eslint-disable-next-line no-useless-catch try { const userID = req.user.userId; @@ -34,7 +33,8 @@ const getContactInfoFunc = async (req: any, res: any) => { console.log("Contact info fetched successfully"); return { data, message: "Contact info fetched successfully", status: 200 }; - } catch (err) { + } catch (err:any) { + console.error(err); throw err; } }; @@ -134,9 +134,9 @@ const putBasicDetailsFunc = async (req: any, res: any) => { } console.log(data.photoUrl); console.log("UPDATEING DATA", data); - const result = await databaseProvider.application.sequelize.transaction( + await databaseProvider.application.sequelize.transaction( async (transaction: any) => { - const docDetail = await databaseActions.update( + await databaseActions.update( "application", "Persons", { @@ -247,13 +247,13 @@ const putRegistrationDetailsFunc = async (req: any, res: any) => { del_urls.push(file_url); const data = req.body; - const result = await databaseProvider.application.sequelize.transaction( + await databaseProvider.application.sequelize.transaction( async (transaction: any) => { data.personDocs = []; if (!docData) { console.log("Docotr details not found"); - const docDetail = await databaseActions.create( + await databaseActions.create( "application", "DoctorDetails", { @@ -268,7 +268,7 @@ const putRegistrationDetailsFunc = async (req: any, res: any) => { } if (file_url) { - const [nrows, rows] = await databaseActions.update( + const [nrows] = await databaseActions.update( "application", "PersonDocs", { @@ -301,7 +301,7 @@ const putRegistrationDetailsFunc = async (req: any, res: any) => { } if (data.departmentId) { - const docDetail = await databaseActions.update( + await databaseActions.update( "application", "Persons", { @@ -315,7 +315,7 @@ const putRegistrationDetailsFunc = async (req: any, res: any) => { console.log("Department updated"); } - const docDetail = await databaseActions.update( + await databaseActions.update( "application", "DoctorDetails", { @@ -377,9 +377,9 @@ const putUpdateEducationFunc = async (req: any, res: any) => { if (data.isCurrent) { data.endDate = null; } - const result = await databaseProvider.application.sequelize.transaction( + await databaseProvider.application.sequelize.transaction( async (transaction: any) => { - const [nrows, rows] = await databaseActions.update( + const [nrows] = await databaseActions.update( "application", "PersonEducations", { @@ -407,9 +407,9 @@ const putUpdateEducationFunc = async (req: any, res: any) => { const putDeleteEducationFunc = async (req: any, res: any) => { try { const educationId = req.params.id; - const result = await databaseProvider.application.sequelize.transaction( + await databaseProvider.application.sequelize.transaction( async (transaction: any) => { - const [nrows, rows] = await databaseActions.update( + const [nrows] = await databaseActions.update( "application", "PersonEducations", { @@ -476,7 +476,7 @@ const putUpdateExperienceFunc = async (req: any, res: any) => { if (data.isCurrent) { data.endDate = null; } - const result = await databaseProvider.application.sequelize.transaction( + await databaseProvider.application.sequelize.transaction( async (transaction: any) => { const [nrows] = await databaseActions.update( "application", @@ -505,10 +505,10 @@ const putUpdateExperienceFunc = async (req: any, res: any) => { const putDeleteExperienceFunc = async (req: any, res: any) => { try { - const result = await databaseProvider.application.sequelize.transaction( + await databaseProvider.application.sequelize.transaction( async (transaction: any) => { const experienceId = req.params.id; - const [nrows, rows] = await databaseActions.update( + const [nrows] = await databaseActions.update( "application", "PersonExperiences", { diff --git a/service/functions/profile.helper.ts b/service/functions/profile.helper.ts deleted file mode 100644 index e69de29..0000000 diff --git a/service/functions/test.functions.ts b/service/functions/test.functions.ts deleted file mode 100644 index 2a6ee93..0000000 --- a/service/functions/test.functions.ts +++ /dev/null @@ -1,100 +0,0 @@ -import { databaseActions } from "@wrappid/service-core"; - -/** - * @returns - */ -const readTestDataAll = async () => { - try { - const result = await databaseActions.findAll("application", "TestDatas"); - return result; - } catch (error: any) { - console.log(error); - throw error; - } -}; - -/** - * - * @param {*} req - * @returns - */ -const readTestData = async (req: any) => { - try { - const result = await databaseActions.findOne("application", "TestDatas", { - where: { id: req.params.id }, - }); - return result; - } catch (error: any) { - console.log(error); - throw error; - } -}; - -/** - * - * @param {*} req - * @returns - */ -const createTestData = async (req: any) => { - try { - const data = await databaseActions.create("application", "TestDatas", { - name: req.body.data, - }); - return data; - } catch (error: any) { - console.log(error); - throw error; - } -}; - -/** - * - * @param {*} req - * @returns - */ -const updateTestData = async (req: any) => { - try { - await databaseActions.update( - "application", - "TestDatas", - { - name: { ...req.body }, - }, - { - where: { - id: req.params.id, - }, - } - ); - } catch (error: any) { - console.log(error); - throw error; - } -}; - -/** - * - * @param {*} req - * @returns - */ -const deleteTestData = async (req: any) => { - try { - const data = await databaseActions.delete("application", "TestDatas", { - where: { - id: req.params.id, - }, - }); - return data; - } catch (error: any) { - console.log(error); - throw error; - } -}; - -export { - readTestDataAll, - readTestData, - createTestData, - updateTestData, - deleteTestData, -}; \ No newline at end of file diff --git a/service/middlewares/test.middleware.ts b/service/middlewares/test.middleware.ts deleted file mode 100644 index fad64f3..0000000 --- a/service/middlewares/test.middleware.ts +++ /dev/null @@ -1,9 +0,0 @@ -export const testMiddleware = (req: any, res: any, next: any) => { - try { - console.log("Test middleware called successfully!"); - - next(); - } catch (error: any) { - res.status(500).json({ error: error.message }); - } -}; \ No newline at end of file diff --git a/service/models/PersonAddresses.model.ts b/service/models/PersonAddresses.model.ts index 2068923..857a79f 100644 --- a/service/models/PersonAddresses.model.ts +++ b/service/models/PersonAddresses.model.ts @@ -101,8 +101,6 @@ export const PersonAddresses = (sequelize: any, DataTypes: any) => { sourceKey: "id", }); } - - }; return personAddresses; diff --git a/service/tasks/TestTask.ts b/service/tasks/TestTask.ts deleted file mode 100644 index efae120..0000000 --- a/service/tasks/TestTask.ts +++ /dev/null @@ -1,15 +0,0 @@ -export const TestTask = { - prePerform: () => { - console.log(`Test Task is initated @ ${new Date()}`); - return true; - }, - perform: () => { - console.log(`Test task is running in every minute @ ${new Date()}`); - }, - postPerform: () => { - console.log(`Test Task is completed @ ${new Date()}`); - console.log("<---------------------------------------------------------->"); - }, - // eslint-disable-next-line @typescript-eslint/no-empty-function - handleError: () => {}, -}; \ No newline at end of file