Skip to content
This repository has been archived by the owner on Sep 13, 2020. It is now read-only.

Commit

Permalink
Merge pull request #23 from Tweetsched/Add_services_list_support
Browse files Browse the repository at this point in the history
Add support of social services
  • Loading branch information
Gleb Kosteiko authored Sep 2, 2018
2 parents 5417849 + 76293f6 commit fcfc8e0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<version>0.1-SNAPSHOT</version>

<properties>
<tweetsched-dto-version>1.33</tweetsched-dto-version>
<tweetsched-dto-version>1.39</tweetsched-dto-version>
<vertx.version>3.5.1</vertx.version>
<jedis-version>2.9.0</jedis-version>
<jackson-module-kotlin-version>2.9.4.1</jackson-module-kotlin-version>
Expand Down
1 change: 1 addition & 0 deletions src/main/java/gk/tweetsched/api/router/ResourceRouter.java
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/assets/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ <h1>Scheduled Tweets</h1>
});

function create(message) {
$.post("/api/tweets", JSON.stringify({message: message}), function () {
$.post("/api/tweets", JSON.stringify({message: message, requiredServices: ["LINKEDIN", "TWITTER"]}), function () {
load();
}, "json");
}
Expand All @@ -79,7 +79,7 @@ <h1>Scheduled Tweets</h1>
$.ajax({
method: "PUT",
url: "/api/tweets/" + id,
data: JSON.stringify({message: message})
data: JSON.stringify({message: message, requiredServices: ["LINKEDIN", "TWITTER"]})
}).done(function () {
load();
});
Expand Down

0 comments on commit fcfc8e0

Please sign in to comment.