- ajax("/whoami", "GET", res => {
- if (res.id > 0)
- {
- this.state.user.id = res.id;
- this.state.user.name = res.name;
+ if (this.state.user.id > 0)
+ {
+ fetch(params.serverUrl + "/whoami", {
+ method: "GET",
+ credentials: params.cors ? "include" : "omit",
+ }).then((res) => {