Change port start developping
This commit is contained in:
@@ -16,7 +16,8 @@ export type Service = {
|
||||
|
||||
export type ServiceAddForm = {
|
||||
name:string,
|
||||
port:number
|
||||
port:number,
|
||||
internalPort?:number
|
||||
}
|
||||
|
||||
export type ServerResponse = {
|
||||
@@ -27,6 +28,11 @@ export type ServerResponseWithID = {
|
||||
id:string
|
||||
}
|
||||
|
||||
export type ChangePort = {
|
||||
port?: number,
|
||||
internalPort?: number
|
||||
}
|
||||
|
||||
export type ServerResponseToken = {
|
||||
status:string,
|
||||
access_token?:string
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { showNotification } from "@mantine/notifications";
|
||||
import { ImCross } from "react-icons/im";
|
||||
import { TiTick } from "react-icons/ti"
|
||||
import { GeneralStats, Service, ServiceAddForm, ServerResponse, RegexFilter, RegexAddForm, ServerStatusResponse, PasswordSend, ChangePassword, LoginResponse, ServerResponseToken, ServerResponseWithID } from "./models";
|
||||
import { GeneralStats, Service, ServiceAddForm, ServerResponse, RegexFilter, RegexAddForm, ServerStatusResponse, PasswordSend, ChangePassword, LoginResponse, ServerResponseToken, ServerResponseWithID, ChangePort } from "./models";
|
||||
|
||||
var Buffer = require('buffer').Buffer
|
||||
|
||||
@@ -128,6 +128,11 @@ export async function regenport(service_id:string){
|
||||
return status === "ok"?undefined:status
|
||||
}
|
||||
|
||||
export async function changeports(service_id:string, data:ChangePort){
|
||||
const { status } = await postapi(`service/${service_id}/change-ports`,data) as ServerResponse;
|
||||
return status === "ok"?undefined:status
|
||||
}
|
||||
|
||||
export async function addservice(data:ServiceAddForm) {
|
||||
return await postapi("services/add",data) as ServerResponseWithID;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user