mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-06 14:36:43 +02:00
update serv command to recognize group ids in urls
This commit is contained in:
@@ -46,10 +46,15 @@ type ServCommandResults struct {
|
||||
}
|
||||
|
||||
// ServCommand preps for a serv call
|
||||
func ServCommand(ctx context.Context, keyID int64, ownerName, repoName string, mode perm.AccessMode, verb, lfsVerb string) (*ServCommandResults, ResponseExtra) {
|
||||
reqURL := setting.LocalURL + fmt.Sprintf("api/internal/serv/command/%d/%s/%s?mode=%d",
|
||||
func ServCommand(ctx context.Context, keyID int64, ownerName, repoName string, groupID int64, mode perm.AccessMode, verb, lfsVerb string) (*ServCommandResults, ResponseExtra) {
|
||||
var groupSegment string
|
||||
if groupID > 0 {
|
||||
groupSegment = fmt.Sprintf("%d/", groupID)
|
||||
}
|
||||
reqURL := setting.LocalURL + fmt.Sprintf("api/internal/serv/command/%d/%s/%s%s?mode=%d",
|
||||
keyID,
|
||||
url.PathEscape(ownerName),
|
||||
groupSegment,
|
||||
url.PathEscape(repoName),
|
||||
mode,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user