Skip to content

Commit 70fab7e

Browse files
authored
document 404 responce and meaning (#11073)
1 parent 2e85ad6 commit 70fab7e

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

routers/api/v1/user/watch.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ func IsWatching(ctx *context.APIContext) {
114114
// responses:
115115
// "200":
116116
// "$ref": "#/responses/WatchInfo"
117+
// "404":
118+
// description: User is not watching this repo or repo do not exist
117119

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

templates/swagger/v1_json.tmpl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7411,6 +7411,9 @@
74117411
"responses": {
74127412
"200": {
74137413
"$ref": "#/responses/WatchInfo"
7414+
},
7415+
"404": {
7416+
"description": "User is not watching this repo or repo do not exist"
74147417
}
74157418
}
74167419
},

0 commit comments

Comments
 (0)