Added autorun and random id service generation

This commit is contained in:
DomySh
2022-06-29 23:40:39 +02:00
parent 0e5f06ff7a
commit a064652fcf
5 changed files with 40 additions and 21 deletions

View File

@@ -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 } from "./models";
import { GeneralStats, Service, ServiceAddForm, ServerResponse, RegexFilter, RegexAddForm, ServerStatusResponse, PasswordSend, ChangePassword, LoginResponse, ServerResponseToken, ServerResponseWithID } from "./models";
var Buffer = require('buffer').Buffer
@@ -119,8 +119,7 @@ export async function regenport(service_id:string){
}
export async function addservice(data:ServiceAddForm) {
const { status } = await postapi("services/add",data) as ServerResponse;
return status === "ok"?undefined:status
return await postapi("services/add",data) as ServerResponseWithID;
}
export async function deleteservice(service_id:string) {