feat: implement create functionality for WapServers across server, sysadmin, and CLI layers
This commit is contained in:
@@ -196,6 +196,21 @@ export type UpdateWapServerPayload = {
|
||||
active?: boolean;
|
||||
};
|
||||
|
||||
export type CreateWapServerPayload = {
|
||||
name: string;
|
||||
ipv4: string;
|
||||
port: number;
|
||||
maxBots: number;
|
||||
ipv6?: string;
|
||||
description?: string;
|
||||
active?: boolean;
|
||||
};
|
||||
|
||||
export const createWapServer = async (data: CreateWapServerPayload): Promise<WapServer> => {
|
||||
const res = await sysadminApi.post('/wap/create', data);
|
||||
return res.data;
|
||||
};
|
||||
|
||||
export const updateWapServer = async (data: UpdateWapServerPayload): Promise<WapServer> => {
|
||||
const res = await sysadminApi.post('/wap/update', data);
|
||||
return res.data;
|
||||
|
||||
Reference in New Issue
Block a user