Added a bunch of CORS related fixes for new shell dev
This commit is contained in:
@@ -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";
|
||||
}
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user