code.gitea.io/gitea@v1.21.7/routers/api/actions/actions.go (about) 1 // Copyright 2022 The Gitea Authors. All rights reserved. 2 // SPDX-License-Identifier: MIT 3 4 package actions 5 6 import ( 7 "net/http" 8 9 "code.gitea.io/gitea/modules/web" 10 "code.gitea.io/gitea/routers/api/actions/ping" 11 "code.gitea.io/gitea/routers/api/actions/runner" 12 ) 13 14 func Routes(prefix string) *web.Route { 15 m := web.NewRoute() 16 17 path, handler := ping.NewPingServiceHandler() 18 m.Post(path+"*", http.StripPrefix(prefix, handler).ServeHTTP) 19 20 path, handler = runner.NewRunnerServiceHandler() 21 m.Post(path+"*", http.StripPrefix(prefix, handler).ServeHTTP) 22 23 return m 24 }