nft rule post json
All checks were successful
Build and Deploy MITM Webserver / build (push) Successful in 9s
All checks were successful
Build and Deploy MITM Webserver / build (push) Successful in 9s
This commit is contained in:
@@ -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
|
||||
------------------------- */
|
||||
|
||||
Reference in New Issue
Block a user