Skip to content

Commit 5744f6d

Browse files
Zettat123techknowlogick
authored andcommitted
add 404 response
1 parent 7f9ea9d commit 5744f6d

File tree

5 files changed

+19
-1
lines changed

5 files changed

+19
-1
lines changed

routers/api/v1/org/org.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,8 @@ func ListOrgActivityFeeds(ctx *context.APIContext) {
400400
// responses:
401401
// "200":
402402
// "$ref": "#/responses/ActivityFeedsList"
403+
// "404":
404+
// "$ref": "#/responses/notFound"
403405

404406
includePrivate := false
405407
if ctx.IsSigned {

routers/api/v1/org/team.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -823,6 +823,8 @@ func ListTeamActivityFeeds(ctx *context.APIContext) {
823823
// responses:
824824
// "200":
825825
// "$ref": "#/responses/ActivityFeedsList"
826+
// "404":
827+
// "$ref": "#/responses/notFound"
826828

827829
listOptions := utils.GetListOptions(ctx)
828830

routers/api/v1/user/user.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,8 @@ func ListUserActivityFeeds(ctx *context.APIContext) {
178178
// responses:
179179
// "200":
180180
// "$ref": "#/responses/ActivityFeedsList"
181+
// "404":
182+
// "$ref": "#/responses/notFound"
181183

182184
includePrivate := ctx.IsSigned && (ctx.Doer.IsAdmin || ctx.Doer.ID == ctx.ContextUser.ID)
183185
listOptions := utils.GetListOptions(ctx)

services/convert/activity.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ func ToActivity(ctx context.Context, ac *activities_model.Action, doer *user_mod
2929
ActUser: ToUser(ctx, ac.ActUser, doer),
3030
RepoID: ac.RepoID,
3131
Repo: ToRepo(ctx, ac.Repo, p.AccessMode),
32-
CommentID: ac.CommentID,
3332
RefName: ac.RefName,
3433
IsPrivate: ac.IsPrivate,
3534
Content: ac.Content,
3635
Created: ac.CreatedUnix.AsTime(),
3736
}
3837

3938
if ac.Comment != nil {
39+
result.CommentID = ac.CommentID
4040
result.Comment = ToComment(ctx, ac.Comment)
4141
}
4242

templates/swagger/v1_json.tmpl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1452,6 +1452,9 @@
14521452
"responses": {
14531453
"200": {
14541454
"$ref": "#/responses/ActivityFeedsList"
1455+
},
1456+
"404": {
1457+
"$ref": "#/responses/notFound"
14551458
}
14561459
}
14571460
}
@@ -2947,6 +2950,9 @@
29472950
"responses": {
29482951
"200": {
29492952
"$ref": "#/responses/ActivityFeedsList"
2953+
},
2954+
"404": {
2955+
"$ref": "#/responses/notFound"
29502956
}
29512957
}
29522958
}
@@ -12784,6 +12790,9 @@
1278412790
"responses": {
1278512791
"200": {
1278612792
"$ref": "#/responses/ActivityFeedsList"
12793+
},
12794+
"404": {
12795+
"$ref": "#/responses/notFound"
1278712796
}
1278812797
}
1278912798
}
@@ -14494,6 +14503,9 @@
1449414503
"responses": {
1449514504
"200": {
1449614505
"$ref": "#/responses/ActivityFeedsList"
14506+
},
14507+
"404": {
14508+
"$ref": "#/responses/notFound"
1449714509
}
1449814510
}
1449914511
}

0 commit comments

Comments
 (0)