260316:1117 20260316:1100 Refactor UUID
Build and Deploy / deploy (push) Successful in 9m24s

This commit is contained in:
admin
2026-03-16 11:17:15 +07:00
parent b93cd91325
commit c5c3ed9016
92 changed files with 1726 additions and 620 deletions
+10 -10
View File
@@ -19,11 +19,11 @@ export const contractService = {
},
/**
* Get contract by ID
* GET /contracts/:id
* Get contract by UUID
* GET /contracts/:uuid
*/
getById: async (id: number) => {
const response = await apiClient.get(`/contracts/${id}`);
getByUuid: async (uuid: string) => {
const response = await apiClient.get(`/contracts/${uuid}`);
return response.data;
},
@@ -38,19 +38,19 @@ export const contractService = {
/**
* Update contract
* PATCH /contracts/:id
* PATCH /contracts/:uuid
*/
update: async (id: number, data: UpdateContractDto) => {
const response = await apiClient.patch(`/contracts/${id}`, data);
update: async (uuid: string, data: UpdateContractDto) => {
const response = await apiClient.patch(`/contracts/${uuid}`, data);
return response.data;
},
/**
* Delete contract
* DELETE /contracts/:id
* DELETE /contracts/:uuid
*/
delete: async (id: number) => {
const response = await apiClient.delete(`/contracts/${id}`);
delete: async (uuid: string) => {
const response = await apiClient.delete(`/contracts/${uuid}`);
return response.data;
},
};