You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
GCSGUI/src/assets/js/request.js

28 lines
699 B
JavaScript

import axios from "axios";
function login(username, password)
{
return axios({
method: "POST",
url: "/onlinetest/htfp/cac/logIn",
headers: {"Content-Type": "application/json"},
data: {
username: username,
password: password,
forceLogOutOtherDeviceAccount: false
}
})
}
function requestAirline(uavID){
return axios({
method: "POST",
url: "/onlinetest/htfp/cac/queryUavBundledRouteList",
headers: [{"Content-Type": "application/json"},{"X-Authorization-With": sessionStorage.getItem("token")}],
data: {
uavId: uavID,
}
})
}
export {login, requestAirline}