690320:2126 UUID agian by Claude Sonnet #02
Build and Deploy / deploy (push) Failing after 4m27s
Build and Deploy / deploy (push) Failing after 4m27s
This commit is contained in:
@@ -6,6 +6,16 @@ import {
|
||||
SearchProjectDto
|
||||
} from "@/types/dto/project/project.dto";
|
||||
|
||||
export interface ProjectListItem {
|
||||
uuid: string;
|
||||
id?: number;
|
||||
projectCode: string;
|
||||
projectName: string;
|
||||
isActive: boolean;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
type ApiEnvelope<T> = {
|
||||
data?: ApiEnvelope<T> | T;
|
||||
message?: string;
|
||||
@@ -39,9 +49,11 @@ export const projectService = {
|
||||
* ดึงรายการโครงการทั้งหมด (รองรับ Search & Pagination)
|
||||
* (เดิมคือ getAllProjects แต่ปรับให้รับ params ได้)
|
||||
*/
|
||||
getAll: async (params?: SearchProjectDto) => {
|
||||
getAll: async (params?: SearchProjectDto): Promise<ProjectListItem[]> => {
|
||||
// GET /projects
|
||||
const response = await apiClient.get("/projects", { params });
|
||||
const response = await apiClient.get<
|
||||
ApiEnvelope<ProjectListItem[]> | ProjectListItem[]
|
||||
>("/projects", { params });
|
||||
return unwrapArrayResponse(response.data);
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user