repo.go 519 B

12345678910111213141516171819202122
  1. // Copyright 2015 The Gogs Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package admin
  5. import (
  6. api "github.com/gogs/go-gogs-client"
  7. "gogs.io/gogs/internal/context"
  8. "gogs.io/gogs/internal/route/api/v1/repo"
  9. "gogs.io/gogs/internal/route/api/v1/user"
  10. )
  11. func CreateRepo(c *context.APIContext, form api.CreateRepoOption) {
  12. owner := user.GetUserByParams(c)
  13. if c.Written() {
  14. return
  15. }
  16. repo.CreateUserRepo(c, owner, form)
  17. }