diff --git a/pom.xml b/pom.xml index e261183..586e02c 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ 0.1-SNAPSHOT - 1.33 + 1.39 3.5.1 2.9.0 2.9.4.1 diff --git a/src/main/java/gk/tweetsched/api/router/ResourceRouter.java b/src/main/java/gk/tweetsched/api/router/ResourceRouter.java index 8466b35..df230d5 100644 --- a/src/main/java/gk/tweetsched/api/router/ResourceRouter.java +++ b/src/main/java/gk/tweetsched/api/router/ResourceRouter.java @@ -116,6 +116,7 @@ private void getAll(RoutingContext context) { private void addOne(RoutingContext context) { Tweet tweet = context.getBodyAsJson().mapTo(Tweet.class); tweet.setId(String.valueOf(UUID.randomUUID())); + tweet.setProfileId("1"); //TODO remove hardcoded profile ID tweetRepository.save(tweet); context.response() .setStatusCode(CREATED) diff --git a/src/main/resources/assets/index.html b/src/main/resources/assets/index.html index cd8ef0c..228e0c5 100644 --- a/src/main/resources/assets/index.html +++ b/src/main/resources/assets/index.html @@ -61,7 +61,7 @@

Scheduled Tweets

}); function create(message) { - $.post("/api/tweets", JSON.stringify({message: message}), function () { + $.post("/api/tweets", JSON.stringify({message: message, requiredServices: ["LINKEDIN", "TWITTER"]}), function () { load(); }, "json"); } @@ -79,7 +79,7 @@

Scheduled Tweets

$.ajax({ method: "PUT", url: "/api/tweets/" + id, - data: JSON.stringify({message: message}) + data: JSON.stringify({message: message, requiredServices: ["LINKEDIN", "TWITTER"]}) }).done(function () { load(); });