Added a bunch of CORS related fixes for new shell dev

This commit is contained in:
Frikky
2022-01-21 19:30:40 +00:00
committed by GitHub
parent d2c9cbec7d
commit 9ce92d6e1f
8 changed files with 87 additions and 54 deletions
+5 -1
View File
@@ -515,7 +515,11 @@ const Apps = (props) => {
valid = "false";
}
if (data.actions === null || data.actions.length === 0) {
if (data.actions === undefined || data.actions === null) {
data.actions = []
}
if (data === undefined || data.actions === undefined || data.actions === null || data.actions.length === 0) {
valid = "false";
}
+2 -1
View File
@@ -44,6 +44,7 @@ const LoginDialog = (props) => {
register,
checkLogin,
} = props;
const [username, setUsername] = useState("");
const [password, setPassword] = useState("");
const [firstRequest, setFirstRequest] = useState(true);
@@ -143,7 +144,7 @@ const LoginDialog = (props) => {
var baseurl = globalUrl;
if (register) {
var url = baseurl + "/api/v1/users/login";
var url = baseurl + "/api/v1/login";
fetch(url, {
mode: "cors",
method: "POST",