1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-22 09:28:28 +00:00

Handle missing README in create repos API (#23387) (#23509)

Backport #23387 
Close #22934

In `/user/repos` API (and other APIs related to creating repos), user
can specify a readme template for auto init. At present, if the
specified template does not exist, a `500` will be returned . This PR
improved the logic and will return a `400` instead of `500`.
This commit is contained in:
Zettat123
2023-03-17 09:05:41 +08:00
committed by GitHub
parent 04d489dbdd
commit e01e78a947
3 changed files with 31 additions and 0 deletions

View File

@@ -33,6 +33,8 @@ func CreateRepo(ctx *context.APIContext) {
// responses:
// "201":
// "$ref": "#/responses/Repository"
// "400":
// "$ref": "#/responses/error"
// "403":
// "$ref": "#/responses/forbidden"
// "404":