Browse Source

document 404 responce and meaning (#11073)

tags/v1.13.0-dev
6543 GitHub 5 years ago
parent
commit
c4b1968f88
2 changed files with 5 additions and 0 deletions
  1. +2
    -0
      routers/api/v1/user/watch.go
  2. +3
    -0
      templates/swagger/v1_json.tmpl

+ 2
- 0
routers/api/v1/user/watch.go View File

@@ -114,6 +114,8 @@ func IsWatching(ctx *context.APIContext) {
// responses:
// "200":
// "$ref": "#/responses/WatchInfo"
// "404":
// description: User is not watching this repo or repo do not exist

if models.IsWatching(ctx.User.ID, ctx.Repo.Repository.ID) {
ctx.JSON(http.StatusOK, api.WatchInfo{


+ 3
- 0
templates/swagger/v1_json.tmpl View File

@@ -7411,6 +7411,9 @@
"responses": {
"200": {
"$ref": "#/responses/WatchInfo"
},
"404": {
"description": "User is not watching this repo or repo do not exist"
}
}
},


Loading…
Cancel
Save