Added reset button

This commit is contained in:
DomySh
2022-07-20 21:19:22 +02:00
parent 1266aebe0e
commit d4cc2f566c
7 changed files with 186 additions and 66 deletions

View File

@@ -54,6 +54,11 @@ export function fireUpdateRequest(){
window.dispatchEvent(new Event(eventUpdateName))
}
export async function resetfiregex(delete_data:boolean = false){
const { status } = await postapi("reset",{delete:delete_data}) as ServerResponse;
return (status === "ok"?undefined:status)
}
export async function getipinterfaces(){
return await getapi("interfaces") as IpInterface[];
}
@@ -87,7 +92,6 @@ export async function setpassword(data:PasswordSend) {
export async function changepassword(data:ChangePassword) {
const { status, access_token } = await postapi("change-password",data) as ServerResponseToken;
console.log(access_token)
if (access_token)
window.localStorage.setItem("access_token", access_token);
return status === "ok"?undefined:status