|
|
@ -141,7 +141,7 @@ func CreateUserRepo(ctx *context.APIContext, owner *models.User, opt api.CreateR
|
|
|
|
ctx.JSON(201, repo.APIFormat(&api.Permission{true, true, true}))
|
|
|
|
ctx.JSON(201, repo.APIFormat(&api.Permission{true, true, true}))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Create create one repository of mine
|
|
|
|
// Create one repository of mine
|
|
|
|
// see https://github.com/gogits/go-gogs-client/wiki/Repositories#create
|
|
|
|
// see https://github.com/gogits/go-gogs-client/wiki/Repositories#create
|
|
|
|
func Create(ctx *context.APIContext, opt api.CreateRepoOption) {
|
|
|
|
func Create(ctx *context.APIContext, opt api.CreateRepoOption) {
|
|
|
|
// Shouldn't reach this condition, but just in case.
|
|
|
|
// Shouldn't reach this condition, but just in case.
|
|
|
@ -244,7 +244,7 @@ func Migrate(ctx *context.APIContext, form auth.MigrateRepoForm) {
|
|
|
|
ctx.JSON(201, repo.APIFormat(&api.Permission{true, true, true}))
|
|
|
|
ctx.JSON(201, repo.APIFormat(&api.Permission{true, true, true}))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Get get one repository
|
|
|
|
// Get one repository
|
|
|
|
// see https://github.com/gogits/go-gogs-client/wiki/Repositories#get
|
|
|
|
// see https://github.com/gogits/go-gogs-client/wiki/Repositories#get
|
|
|
|
func Get(ctx *context.APIContext) {
|
|
|
|
func Get(ctx *context.APIContext) {
|
|
|
|
repo := ctx.Repo.Repository
|
|
|
|
repo := ctx.Repo.Repository
|
|
|
@ -266,7 +266,7 @@ func GetByID(ctx *context.APIContext) {
|
|
|
|
ctx.JSON(200, repo.APIFormat(&api.Permission{true, true, true}))
|
|
|
|
ctx.JSON(200, repo.APIFormat(&api.Permission{true, true, true}))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Delete delete one repository
|
|
|
|
// Delete one repository
|
|
|
|
// see https://github.com/gogits/go-gogs-client/wiki/Repositories#delete
|
|
|
|
// see https://github.com/gogits/go-gogs-client/wiki/Repositories#delete
|
|
|
|
func Delete(ctx *context.APIContext) {
|
|
|
|
func Delete(ctx *context.APIContext) {
|
|
|
|
owner := ctx.Repo.Owner
|
|
|
|
owner := ctx.Repo.Owner
|
|
|
|