Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
RyhisT committed Apr 25, 2018
2 parents 69e652b + 501ebbb commit e108f71
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ public Iterable<BlogPost> getBlog(){

//curl -v http://localhost:8080/blogPost/2
@RequestMapping(value = "/blogpost/{blogId}", method = RequestMethod.GET)
public Optional<BlogPost> getBlog(@PathVariable long blogId){
return blogPostRepo.findById(blogId);
public Optional<BlogPost> getBlog(@PathVariable String blogId){
return blogPostRepo.findById(Long.parseLong(blogId));
}

//curl -X DELETE http://localhost:8080/blogpost/2
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/fi/pizzalovers/blogbackend/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import java.security.SecureRandom;

@Entity
@Table(name = "users")
@Table(name = "userna")
public class User {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
Expand Down

0 comments on commit e108f71

Please sign in to comment.