mirror of
https://github.com/thomiceli/opengist.git
synced 2025-06-13 05:47:12 +02:00
@ -318,7 +318,7 @@ func processCreate(ctx echo.Context) error {
|
||||
}
|
||||
|
||||
if err = gist.AddAndCommitFiles(&dto.Files); err != nil {
|
||||
return errorRes(500, "Error adding and commiting files", err)
|
||||
return errorRes(500, "Error adding and committing files", err)
|
||||
}
|
||||
|
||||
if isCreate {
|
||||
|
@ -151,10 +151,9 @@ func infoRefs(ctx echo.Context) error {
|
||||
gist := getData(ctx, "gist").(*models.Gist)
|
||||
|
||||
serviceType := ctx.QueryParam("service")
|
||||
if !strings.HasPrefix(serviceType, "git-") {
|
||||
service = ""
|
||||
if strings.HasPrefix(serviceType, "git-") {
|
||||
service = strings.TrimPrefix(serviceType, "git-")
|
||||
}
|
||||
service = strings.TrimPrefix(serviceType, "git-")
|
||||
|
||||
if service != "upload-pack" && service != "receive-pack" {
|
||||
if err := gist.UpdateServerInfo(); err != nil {
|
||||
|
Reference in New Issue
Block a user