260224:1606 20260224:1600 V1.8.0
All checks were successful
Build and Deploy / deploy (push) Successful in 6m25s

This commit is contained in:
admin
2026-02-24 16:06:15 +07:00
parent 97cc41f489
commit 158179d4a5
255 changed files with 5339 additions and 2094 deletions

View File

@@ -1,9 +1,9 @@
// File: lib/services/json-schema.service.ts
import apiClient from "@/lib/api/client";
import {
CreateJsonSchemaDto,
UpdateJsonSchemaDto,
SearchJsonSchemaDto
import {
CreateJsonSchemaDto,
UpdateJsonSchemaDto,
SearchJsonSchemaDto
} from "@/types/dto/json-schema/json-schema.dto";
export const jsonSchemaService = {
@@ -64,7 +64,7 @@ export const jsonSchemaService = {
/**
* (Optional) ตรวจสอบความถูกต้องของข้อมูลกับ Schema ฝั่ง Server
*/
validate: async (code: string, data: any) => {
validate: async (code: string, data: Record<string, unknown>) => {
// POST /json-schemas/validate
const response = await apiClient.post(`/json-schemas/validate`, {
schemaCode: code,
@@ -72,4 +72,4 @@ export const jsonSchemaService = {
});
return response.data; // { valid: true, errors: [] }
}
};
};