nft rule post json
All checks were successful
Build and Deploy MITM Webserver / build (push) Successful in 9s

This commit is contained in:
2026-02-11 21:26:58 +01:00
parent c34b71f5d7
commit 6c5b5ef4a1
9 changed files with 1000 additions and 267 deletions

View File

@@ -1,6 +1,6 @@
// src/apiClient.ts
import axios from "axios";
import { RulesetModel } from "../types/firewall";
import { CreateRuleRequest, ExecResult, RulesetModel } from "../types/firewall";
import {
BridgeCreateRequest,
BridgeInfo,
@@ -155,6 +155,14 @@ export const deleteRule = async (
return res.data;
};
/**
* createRuleJson - POST /firewall/rules
* Body: CreateRuleRequest (must include expr)
*/
export const createRuleJson = async (req: CreateRuleRequest): Promise<ExecResult> => {
const res = await api.post<ExecResult>("/firewall/rules", req);
return res.data;
};
/* -------------------------
Scripts
------------------------- */