This repository has been archived by the owner on Jun 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 549
[RestServer] API for user requests (sign up, vc request, storage) #4948
Open
yiyione
wants to merge
39
commits into
master
Choose a base branch
from
yiyi/restserver_user_vc_request
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
13 tasks
abuccts
reviewed
Oct 14, 2020
src/rest-server/src/utils/error.d.ts
Outdated
@@ -42,6 +42,7 @@ declare type Code = | |||
'NoGroupError' | | |||
'NoStorageError' | | |||
'NoVirtualClusterError' | | |||
'NoRequestError' | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the name is strange, sounds like no http request received
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to NoUserRequestError
.
@@ -35,6 +36,7 @@ router.use('/storages', storageRouter); | |||
router.use('/storage', storageDeprecatedRouter); | |||
router.use('/tokens', tokenRouter); | |||
router.use('/kubernetes', k8sRouter); | |||
router.use('/requests', requestRouter); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update api docs accordingly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR is a part of feature
Group & VC request management for user and admin
#4949APIs for user request:
The request struct example:
POST /api/v2/requests/user
Create a user request, it's the API for user sign up (without token check)
POST /api/v2/requests/:requestType
Create a request, for vc/storage request
GET /api/v2/requests/:requestType
Get requests, the
requestType
should be one of [ user, vc, storage ].PUT /api/v2/requests/:requestId
Update a request state (new, approved or rejected), the
requestId
should be an uuid.Admin only.
DELETE /api/v2/requests/:requestId
Delete a request
Admin only.