added reaction endpoint
This commit is contained in:
@@ -83,7 +83,7 @@ public class JodelPost {
|
||||
this.content = rs.getString("content");
|
||||
this.date = rs.getTimestamp("postdate");
|
||||
this.location = new Location(rs.getFloat("longitude"), rs.getFloat("latitude"));
|
||||
this.reaction = Optional.of(rs.getBoolean("reaction"));
|
||||
this.reaction = rs.getString("reaction") == null ? Optional.empty() : Optional.of(rs.getBoolean("reaction"));
|
||||
this.reactions = new Reactions(rs.getLong("positive"), rs.getLong("negative"));
|
||||
this.parent = Optional.of(rs.getLong("parent"));
|
||||
}
|
||||
@@ -99,7 +99,7 @@ public class JodelPost {
|
||||
@JsonProperty("date") Timestamp date,
|
||||
@JsonProperty("location") Location location,
|
||||
@JsonProperty("parent") Optional<Long> parent) {
|
||||
this.authorID = User.getUserID(); // TODO: getter from Keycloak
|
||||
this.authorID = User.getID(); // TODO: getter from Keycloak
|
||||
this.title = title;
|
||||
this.content = content;
|
||||
this.date = date;
|
||||
|
||||
Reference in New Issue
Block a user