fastsurvey / backend

FastSurvey's backend that's crunching the data
1 stars 0 forks source link

Fetch Config: Drafts are returned as well #55

Closed dostuffthatmatters closed 3 years ago

dostuffthatmatters commented 3 years ago

I think in draft mode the API should not respond with the drafted config, since it is not "published".

What do you think?

empicano commented 3 years ago

Can you think of a use case where we would need it to be returned? E.g. when you access the survey in the console? If not, it makes sense to me, too, to not return drafts, as it's a route without authentication. So: return drafts on GET /users/{username}/surveys, don't return on GET /users/{username}/surveys/{survey_name}?

dostuffthatmatters commented 3 years ago

Yes! That's what I think too.

If we want to render drafts to the authenticated creator we can do that later but for now this is better.