reichlab / forecast-repository

Codebase for Zoltar forecast repository
https://zoltardata.com/
GNU General Public License v3.0
6 stars 3 forks source link

Browsing the root /api/ endpoint is blank #274

Open matthewcornell opened 4 years ago

matthewcornell commented 4 years ago

The "root URI" link on https://docs.zoltardata.com/api/ points to https://www.zoltardata.com/api/ , which is a valid endpoint, but which is not returning anything, unlike, say, https://www.zoltardata.com/api/projects/ . The problem seems to be that forecast_app.api_views.api_root() is passed a rest_framework.request.Request object whose user is AnonymousUser, even if the user is logged in, and so returns a HttpResponseForbidden. As opposed to forecast_app.api_views.ProjectList.test_func(), which is passed a WSGIRequest that does have the correct user. The root uri works correctly from zoltpy.