Compare commits
2 Commits
a4ce8940ab
...
4e07b01b6a
Author | SHA1 | Date | |
---|---|---|---|
4e07b01b6a | |||
2f70515407 |
@ -44,7 +44,6 @@ public class CreateEventController {
|
||||
|
||||
@FXML
|
||||
public void initialize() {
|
||||
|
||||
StringConverter<LocalTime> defaultConverter = new LocalTimeStringConverter(FormatStyle.SHORT, Locale.GERMANY);
|
||||
timeStart.set24HourView(true);
|
||||
timeStart.setConverter(defaultConverter);
|
||||
|
@ -148,7 +148,7 @@ public class DataController {
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
objectMapper.findAndRegisterModules();
|
||||
try {
|
||||
return objectMapper.readValue(userJSON, new TypeReference<List<User>>() {});
|
||||
return (List<User>)objectMapper.readValue(userJSON, new TypeReference<List<User>>() {});
|
||||
} catch (JsonProcessingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@ -158,7 +158,11 @@ public class DataController {
|
||||
public void createUser(User user) throws HttpRequestException {
|
||||
sendBasicHttpRequest(
|
||||
ADD_USER_ENDPOINT,
|
||||
"",
|
||||
"name=" + user.getName() +
|
||||
"&forename=" + user.getForename() +
|
||||
"&login=" + user.getLogin() +
|
||||
"&password=" + user.getPassword() +
|
||||
"&isAdmin=" + user.isAdmin(),
|
||||
true
|
||||
);
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ public class User {
|
||||
private String login;
|
||||
private String forename;
|
||||
private String name;
|
||||
private String password;
|
||||
private boolean isAdmin;
|
||||
|
||||
public User(){}
|
||||
@ -49,4 +50,12 @@ public class User {
|
||||
public void setAdmin(boolean admin) {
|
||||
isAdmin = admin;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user