You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

actions.go 595B

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