aboutsummaryrefslogtreecommitdiff
path: root/routers/api/v1
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2017-02-23 14:09:43 -0500
committerUnknwon <u@gogs.io>2017-02-27 22:47:12 -0500
commit87f0ce793da616dfea3280bf37174642b05e0ce5 (patch)
tree2b967cde9f2cc30b9572a035301311e43f265ec4 /routers/api/v1
parent25cf755f3082db7c35b329a5a7abf916150c13f8 (diff)
repo: able to perform initial commit on behave of actual user
Diffstat (limited to 'routers/api/v1')
-rw-r--r--routers/api/v1/repo/repo.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/api/v1/repo/repo.go b/routers/api/v1/repo/repo.go
index 147b980d..a6dd284a 100644
--- a/routers/api/v1/repo/repo.go
+++ b/routers/api/v1/repo/repo.go
@@ -149,7 +149,7 @@ func ListOrgRepositories(ctx *context.APIContext) {
}
func CreateUserRepo(ctx *context.APIContext, owner *models.User, opt api.CreateRepoOption) {
- repo, err := models.CreateRepository(owner, models.CreateRepoOptions{
+ repo, err := models.CreateRepository(ctx.User, owner, models.CreateRepoOptions{
Name: opt.Name,
Description: opt.Description,
Gitignores: opt.Gitignores,
@@ -256,7 +256,7 @@ func Migrate(ctx *context.APIContext, f form.MigrateRepo) {
return
}
- repo, err := models.MigrateRepository(ctxUser, models.MigrateRepoOptions{
+ repo, err := models.MigrateRepository(ctx.User, ctxUser, models.MigrateRepoOptions{
Name: f.RepoName,
Description: f.Description,
IsPrivate: f.Private || setting.Repository.ForcePrivate,