Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
abc7893f
Unverified
Commit
abc7893f
authored
Dec 04, 2019
by
Arve Knudsen
Committed by
GitHub
Dec 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Server: Return 404 when non-pending invite is requested (#20863)
Server API: Return 404 when non-pending invite is requested
parent
6682a36b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletions
+6
-1
pkg/api/org_invite.go
+6
-1
No files found.
pkg/api/org_invite.go
View file @
abc7893f
...
...
@@ -132,9 +132,11 @@ func RevokeInvite(c *m.ReqContext) Response {
return
Success
(
"Invite revoked"
)
}
// GetInviteInfoByCode gets a pending user invite corresponding to a certain code.
// A response containing an InviteInfo object is returned if the invite is found.
// If a (pending) invite is not found, 404 is returned.
func
GetInviteInfoByCode
(
c
*
m
.
ReqContext
)
Response
{
query
:=
m
.
GetTempUserByCodeQuery
{
Code
:
c
.
Params
(
":code"
)}
if
err
:=
bus
.
Dispatch
(
&
query
);
err
!=
nil
{
if
err
==
m
.
ErrTempUserNotFound
{
return
Error
(
404
,
"Invite not found"
,
nil
)
...
...
@@ -143,6 +145,9 @@ func GetInviteInfoByCode(c *m.ReqContext) Response {
}
invite
:=
query
.
Result
if
invite
.
Status
!=
m
.
TmpUserInvitePending
{
return
Error
(
404
,
"Invite not found"
,
nil
)
}
return
JSON
(
200
,
dtos
.
InviteInfo
{
Email
:
invite
.
Email
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment