refactor: rename files
This commit is contained in:
29
routers/api/actions/actions.go
Normal file
29
routers/api/actions/actions.go
Normal file
@@ -0,0 +1,29 @@
|
||||
// Copyright 2022 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package actions
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
|
||||
"code.gitea.io/gitea/modules/web"
|
||||
"code.gitea.io/gitea/routers/api/actions/grpc"
|
||||
)
|
||||
|
||||
func Routes(_ context.Context, prefix string) *web.Route {
|
||||
m := web.NewRoute()
|
||||
|
||||
for _, fn := range []grpc.RouteFn{
|
||||
grpc.V1Route,
|
||||
grpc.V1AlphaRoute,
|
||||
grpc.HealthRoute,
|
||||
grpc.PingRoute,
|
||||
grpc.RunnerRoute,
|
||||
} {
|
||||
path, handler := fn()
|
||||
m.Post(path+"*", http.StripPrefix(prefix, handler).ServeHTTP)
|
||||
}
|
||||
|
||||
return m
|
||||
}
|
||||
Reference in New Issue
Block a user