Skip to content

Commit

Permalink
Remove trailing slash from posts api root
Browse files Browse the repository at this point in the history
  • Loading branch information
hasali19 committed Jun 27, 2020
1 parent 0ce6174 commit c095228
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions drp/api/posts.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def serialize_post(post):
}


@posts.route("/", methods=["GET", "POST"])
@posts.route("", methods=["GET", "POST"])
def all_posts():
if request.method == "GET":
return get_posts()
Expand All @@ -68,10 +68,8 @@ def get_posts():
page = request.args.get("page")
per_page = request.args.get("per_page")

query = Post.query.join(Post.latest_rev) \
.options(
joinedload("latest_rev")
.options(
query = Post.query.join(Post.latest_rev).options(
joinedload("latest_rev").options(
joinedload("tags"),
joinedload("files")))

Expand Down

0 comments on commit c095228

Please sign in to comment.