added user reaction
This commit is contained in:
@@ -88,6 +88,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.reactions = new Reactions(rs.getLong("positive"), rs.getLong("negative"));
|
||||
this.parent = Optional.of(rs.getLong("parent"));
|
||||
}
|
||||
@@ -102,10 +103,8 @@ public class JodelPost {
|
||||
@JsonProperty("content") String content,
|
||||
@JsonProperty("date") Timestamp date,
|
||||
@JsonProperty("location") Location location,
|
||||
@JsonProperty("parent") Optional<Long> parent,
|
||||
// TODO: getter from Keycloak
|
||||
@JsonProperty("authorID") long author) {
|
||||
this.authorID = author; // TODO: getter from Keycloak
|
||||
@JsonProperty("parent") Optional<Long> parent) {
|
||||
this.authorID = User.getUserID(); // TODO: getter from Keycloak
|
||||
this.title = title;
|
||||
this.content = content;
|
||||
this.date = date;
|
||||
|
||||
Reference in New Issue
Block a user