aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1/org
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2021-02-19 21:36:43 +0000
committerGitHub <noreply@github.com>2021-02-19 22:36:43 +0100
commitaa4f9180e4932a9813e898bf3bd9ac91924eeb03 (patch)
treee181203ffc52a8bb1740fdb81aeeeba5183c42bf /routers/api/v1/org
parent39aa11f9c0d8aabd188f543d60752e0b8ff95cc5 (diff)
downloadgitea-aa4f9180e4932a9813e898bf3bd9ac91924eeb03.tar.gz
gitea-aa4f9180e4932a9813e898bf3bd9ac91924eeb03.zip
Clarify the suffices and prefixes of setting.AppSubURL and setting.AppURL (#12999)
Also removes some unnecessary uses of fmt.Sprintf and adds documentation strings Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'routers/api/v1/org')
-rw-r--r--routers/api/v1/org/member.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/routers/api/v1/org/member.go b/routers/api/v1/org/member.go
index 75ae1191a5..5f0e36386e 100644
--- a/routers/api/v1/org/member.go
+++ b/routers/api/v1/org/member.go
@@ -5,7 +5,6 @@
package org
import (
- "fmt"
"net/http"
"code.gitea.io/gitea/models"
@@ -153,8 +152,7 @@ func IsMember(ctx *context.APIContext) {
}
}
- redirectURL := fmt.Sprintf("%sapi/v1/orgs/%s/public_members/%s",
- setting.AppURL, ctx.Org.Organization.Name, userToCheck.Name)
+ redirectURL := setting.AppURL + "api/v1/orgs/" + ctx.Org.Organization.Name + "/public_members/" + userToCheck.Name
ctx.Redirect(redirectURL, 302)
}