diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GTBEstadoCivil/GTBEstadoCivilRemoveData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/GTBEstadoCivil/GTBEstadoCivilRemoveData.ts index cfcd994..4b210db 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GTBEstadoCivil/GTBEstadoCivilRemoveData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/GTBEstadoCivil/GTBEstadoCivilRemoveData.ts @@ -1,9 +1,8 @@ import API from "@/services/api/Api"; import { GTBEstadoCivilInterface } from "../../_interfaces/GTBEstadoCivilInterface"; import { Methods } from "@/services/api/enums/ApiMethodEnum"; -import { withClientErrorHandler } from "@/actions/withClientErrorHandler/withClientErrorHandler"; -async function executeGTBEstadoCivilRemoveData(data: GTBEstadoCivilInterface) { +export default async function executeGTBEstadoCivilRemoveData(data: GTBEstadoCivilInterface) { const api = new API(); @@ -12,6 +11,4 @@ async function executeGTBEstadoCivilRemoveData(data: GTBEstadoCivilInterface) { endpoint: `administrativo/g_tb_bairro/${data.tb_estadocivil_id}` }); -} - -export const GTBEstadoCivilRemoveData = withClientErrorHandler(executeGTBEstadoCivilRemoveData) \ No newline at end of file +} \ No newline at end of file diff --git a/src/app/(protected)/(cadastros)/cadastros/_data/GTBEstadoCivil/GTBEstadoCivilSaveData.ts b/src/app/(protected)/(cadastros)/cadastros/_data/GTBEstadoCivil/GTBEstadoCivilSaveData.ts index f48410e..da800a6 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_data/GTBEstadoCivil/GTBEstadoCivilSaveData.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_data/GTBEstadoCivil/GTBEstadoCivilSaveData.ts @@ -1,9 +1,8 @@ import API from "@/services/api/Api"; import { GTBEstadoCivilInterface } from "../../_interfaces/GTBEstadoCivilInterface"; import { Methods } from "@/services/api/enums/ApiMethodEnum"; -import { withClientErrorHandler } from "@/actions/withClientErrorHandler/withClientErrorHandler"; -async function executeGTBEstadoCivilSaveData(data: GTBEstadoCivilInterface) { +export default async function GTBEstadoCivilSaveData(data: GTBEstadoCivilInterface) { const isUpdate = Boolean(data.tb_estadocivil_id); @@ -15,6 +14,4 @@ async function executeGTBEstadoCivilSaveData(data: GTBEstadoCivilInterface) { body: data }); -} - -export const GTBEstadoCivilSaveData = withClientErrorHandler(executeGTBEstadoCivilSaveData) \ No newline at end of file +} \ No newline at end of file diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_estadocivil/GTBEstadoCivilIndexService.ts b/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_estadocivil/GTBEstadoCivilIndexService.ts index f14c950..db35804 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_estadocivil/GTBEstadoCivilIndexService.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_estadocivil/GTBEstadoCivilIndexService.ts @@ -7,7 +7,6 @@ async function executeGTBEstadoCivilIndexService() { const response = await GTBEstadoCivilIndexData(); return response; } catch (error) { - console.log(error) return error } } diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_estadocivil/GTBEstadoCivilRemoveService.ts b/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_estadocivil/GTBEstadoCivilRemoveService.ts index 4c19f10..da73a58 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_estadocivil/GTBEstadoCivilRemoveService.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_estadocivil/GTBEstadoCivilRemoveService.ts @@ -1,10 +1,13 @@ +import { withClientErrorHandler } from "@/actions/withClientErrorHandler/withClientErrorHandler"; import GTBEstadoCivilSaveData from "../../_data/GTBEstadoCivil/GTBEstadoCivilSaveData"; import { GTBEstadoCivilInterface } from "../../_interfaces/GTBEstadoCivilInterface"; -export default async function GTBEstadoCivilRemoveService(data: GTBEstadoCivilInterface) { +async function executeGTBEstadoCivilRemoveService(data: GTBEstadoCivilInterface) { const response = await GTBEstadoCivilSaveData(data); return response; -} \ No newline at end of file +} + +export const GTBEstadoCivilRemoveService = withClientErrorHandler(executeGTBEstadoCivilRemoveService) \ No newline at end of file diff --git a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_estadocivil/GTBEstadoCivilSaveService.ts b/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_estadocivil/GTBEstadoCivilSaveService.ts index 0567d52..3b479a7 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_estadocivil/GTBEstadoCivilSaveService.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_services/g_tb_estadocivil/GTBEstadoCivilSaveService.ts @@ -1,12 +1,13 @@ +import { withClientErrorHandler } from "@/actions/withClientErrorHandler/withClientErrorHandler"; import GTBEstadoCivilSaveData from "../../_data/GTBEstadoCivil/GTBEstadoCivilSaveData"; import { GTBEstadoCivilInterface } from "../../_interfaces/GTBEstadoCivilInterface"; -export default async function GTBEstadoCivilSaveService(data: GTBEstadoCivilInterface) { +async function executeGTBEstadoCivilSaveService(data: GTBEstadoCivilInterface) { const response = await GTBEstadoCivilSaveData(data); - console.log('GTBRegimeComunhaoSaveData', response) - return response; -} \ No newline at end of file +} + +export const GTBEstadoCivilSaveService = withClientErrorHandler(executeGTBEstadoCivilSaveService) \ No newline at end of file