when space is created, add the creator to space as admin#180
Merged
Conversation
robkooper
reviewed
Feb 25, 2021
bodom0015
approved these changes
Feb 26, 2021
Member
bodom0015
left a comment
There was a problem hiding this comment.
LGTM 👍
Works as expected:
MacBook-Pro:clowder lambert8$ curl localhost:9000/api/spaces -XPOST --header 'Content-Type: application/json' -d '{ "name": "created via API", "description": "I created this via the API" }' --header 'X-Api-Key: d890834f-9b1b-48a6-9935-ba79fa73dd49'
{"id":"60389efbd72872db4b17c3ed"}
MacBook-Pro:clowder lambert8$ curl localhost:9000/api/spaces --header 'Content-Type: application/json' --header 'X-Api-Key: d890834f-9b1b-48a6-9935-ba79fa73dd49'
[{"id":"60389efbd72872db4b17c3ed","name":"created via API","description":"I created this via the API","created":"Fri Feb 26 01:10:51 CST 2021"},
...
}]
lmarini
approved these changes
Mar 1, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Previously, when a space was created using the api, the user that created the space was not added to the space as an admin upon creation. This meant that if a user created a space with a POST request and then used a GET request to get available spaces, the new space would not show up.
To test that this is fixed, create a space using POST (curl or postman) and then do a GET. Note that before the new space did not show up, but now it does.
Fixes #179
Review Time Estimate
Types of changes
Checklist: