fastsurvey / backend

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

API: Create new survey - duplication of survey_name #48

Closed dostuffthatmatters closed 3 years ago

dostuffthatmatters commented 3 years ago

Very small thing 😅

For POST /users/{username}/surveys/{survey_name} (creating a new survey) the username has to be only in the path but the survey_name has to both in the path and the posted config.

It's just a little bit confusing - my thoughts: Either both in path and config or neither.

empicano commented 3 years ago

You can change the name of a survey by using different survey names in path and body via PUT /users/{username}/surveys/{survey_name}. For the POST request this is not strictly necessary (and will fail), you're right, but I like the consistency.

dostuffthatmatters commented 3 years ago

Aah, that makes sense! Thanks :)

So with a new survey_name use the old one in the path and the new one in the config right?

empicano commented 3 years ago

Yes, that's it!