Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions webcompat/api/endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
from flask import abort
from flask import Blueprint
from flask import g
from flask import redirect
from flask import request
from flask import session
from flask import url_for

from webcompat import app
from webcompat import limiter
Expand Down Expand Up @@ -128,7 +130,8 @@ def get_issue_category(issue_category):
# For paginated results on the /issues page,
# see /issues/search/needstriage.
elif issue_category == 'new':
abort(301)
return redirect(url_for('api.get_issue_category',
issue_category='needstriage'), 301)

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

else:
# The path doesn’t exist. 404 Not Found.
abort(404)
Expand Down Expand Up @@ -189,7 +192,8 @@ def get_category_from_search(issue_category):
query_string += ' state:closed '
return get_search_results(query_string, params)
elif issue_category == 'new':
abort(301)
return redirect(url_for('api.get_category_from_search',
issue_category='needstriage'), 301)
else:
# no known keyword we send not found
abort(404)
Expand Down