modified: backend/src/controllers/dynamicApiController.ts
modified: backend/src/controllers/endpointController.ts new file: backend/src/migrations/007_add_detailed_response.sql modified: frontend/src/components/EndpointModal.tsx modified: frontend/src/types/index.ts
This commit is contained in:
@@ -41,6 +41,8 @@ export default function EndpointModal({
|
||||
aql_endpoint: endpoint?.aql_endpoint || '',
|
||||
aql_body: endpoint?.aql_body || '',
|
||||
aql_query_params: endpoint?.aql_query_params || {},
|
||||
// Response format
|
||||
detailed_response: endpoint?.detailed_response || false,
|
||||
});
|
||||
|
||||
const [editingQueryIndex, setEditingQueryIndex] = useState<number | null>(null);
|
||||
@@ -592,7 +594,7 @@ export default function EndpointModal({
|
||||
</>
|
||||
)}
|
||||
|
||||
<div className="flex items-center gap-6">
|
||||
<div className="flex flex-wrap items-center gap-6">
|
||||
<label className="flex items-center gap-2">
|
||||
<input
|
||||
type="checkbox"
|
||||
@@ -612,6 +614,16 @@ export default function EndpointModal({
|
||||
/>
|
||||
<span className="text-sm text-gray-700">Логгировать запросы</span>
|
||||
</label>
|
||||
|
||||
<label className="flex items-center gap-2">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={formData.detailed_response}
|
||||
onChange={(e) => setFormData({ ...formData, detailed_response: e.target.checked })}
|
||||
className="rounded"
|
||||
/>
|
||||
<span className="text-sm text-gray-700">Детализировать ответ (rowCount, executionTime)</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
{formData.parameters.length > 0 && (
|
||||
|
||||
@@ -78,6 +78,8 @@ export interface Endpoint {
|
||||
aql_endpoint?: string;
|
||||
aql_body?: string;
|
||||
aql_query_params?: Record<string, string>;
|
||||
// Response format
|
||||
detailed_response?: boolean;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user