Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

The listing API overwrites an existing listing that has the given slug. #105

Closed
rmisio opened this issue Aug 31, 2016 · 3 comments
Closed
Labels

Comments

@rmisio
Copy link
Collaborator

rmisio commented Aug 31, 2016

Scenario #1

Steps to reproduce:
1.) Send a POST to create a new listing with the slug 'check-yo-self'.
2.) Send another POST to create a new listing with the slug 'check-yo-self'.

Observed Results:
The second post creates a listing that overwrites the one from the first post.

Expected Results:
On the second POST an error is returned saying 'That slug already exists' and the second listing is not saved.

Scenario #2

Steps to reproduce:
1.) Send a POST to create a new listing with the slug 'hello-world'.
2.) Send a POST to create a new listing with the slug 'bye-world'.
3.) Update the 'bye-world' listing by sending a PUT with a slug of 'hello-world' and a currentSlug of 'bye-world'.

Observed Results:
The 'hello-world' listing is overwritten with the updated contents of the 'bye-world' listing.

Expected Results:
If you attempt to update the slug of a listing to a slug that already exists, an error is returned saying 'That slug already exists' and the listing is not saved.

@rmisio rmisio changed the title On a POST, the listing API overwrites an existing listing with that has the given slug. On a POST, the listing API overwrites an existing listing that has the given slug. Aug 31, 2016
@rmisio rmisio changed the title On a POST, the listing API overwrites an existing listing that has the given slug. The listing API overwrites an existing listing that has the given slug. Sep 5, 2016
@rmisio
Copy link
Collaborator Author

rmisio commented Sep 5, 2016

This behavior also happens on a PUT. I've updated the title and description to reflect that.

@cpacia cpacia closed this as completed in 679989f Sep 6, 2016
@rmisio
Copy link
Collaborator Author

rmisio commented Sep 8, 2016

This is still an issue on PUTs, please see Scenario #2 in the description.

@rmisio rmisio reopened this Sep 8, 2016
@cpacia
Copy link
Member

cpacia commented Sep 8, 2016

got it

@cpacia cpacia added the bug label Oct 8, 2016
@cpacia cpacia closed this as completed in b2b21f1 Oct 13, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants