From 2084a7a5c445be7bab75d563e736c9b01b890d17 Mon Sep 17 00:00:00 2001 From: RedCocoon Date: Sat, 2 Nov 2024 02:35:21 +0800 Subject: [PATCH] Remove unneccessary api calls --- routers/api/v1/repo/conversation_comment.go | 89 --------------------- 1 file changed, 89 deletions(-) diff --git a/routers/api/v1/repo/conversation_comment.go b/routers/api/v1/repo/conversation_comment.go index 4ab352b0d68..04adb35313e 100644 --- a/routers/api/v1/repo/conversation_comment.go +++ b/routers/api/v1/repo/conversation_comment.go @@ -493,56 +493,6 @@ func EditConversationComment(ctx *context.APIContext) { editConversationComment(ctx, *form) } -// EditConversationCommentDeprecated modify a comment of an conversation -func EditConversationCommentDeprecated(ctx *context.APIContext) { - // swagger:operation PATCH /repos/{owner}/{repo}/conversations/{index}/comments/{id} conversation conversationEditCommentDeprecated - // --- - // summary: Edit a comment - // deprecated: true - // consumes: - // - application/json - // produces: - // - application/json - // parameters: - // - name: owner - // in: path - // description: owner of the repo - // type: string - // required: true - // - name: repo - // in: path - // description: name of the repo - // type: string - // required: true - // - name: index - // in: path - // description: this parameter is ignored - // type: integer - // required: true - // - name: id - // in: path - // description: id of the comment to edit - // type: integer - // format: int64 - // required: true - // - name: body - // in: body - // schema: - // "$ref": "#/definitions/EditConversationCommentOption" - // responses: - // "200": - // "$ref": "#/responses/Comment" - // "204": - // "$ref": "#/responses/empty" - // "403": - // "$ref": "#/responses/forbidden" - // "404": - // "$ref": "#/responses/notFound" - - form := web.GetForm(ctx).(*api.EditConversationCommentOption) - editConversationComment(ctx, *form) -} - func editConversationComment(ctx *context.APIContext, form api.EditConversationCommentOption) { comment, err := conversations_model.GetCommentByID(ctx, ctx.PathParamInt64(":id")) if err != nil { @@ -621,45 +571,6 @@ func DeleteConversationComment(ctx *context.APIContext) { deleteConversationComment(ctx) } -// DeleteConversationCommentDeprecated delete a comment from an conversation -func DeleteConversationCommentDeprecated(ctx *context.APIContext) { - // swagger:operation DELETE /repos/{owner}/{repo}/conversations/{index}/comments/{id} conversation conversationDeleteCommentDeprecated - // --- - // summary: Delete a comment - // deprecated: true - // parameters: - // - name: owner - // in: path - // description: owner of the repo - // type: string - // required: true - // - name: repo - // in: path - // description: name of the repo - // type: string - // required: true - // - name: index - // in: path - // description: this parameter is ignored - // type: integer - // required: true - // - name: id - // in: path - // description: id of comment to delete - // type: integer - // format: int64 - // required: true - // responses: - // "204": - // "$ref": "#/responses/empty" - // "403": - // "$ref": "#/responses/forbidden" - // "404": - // "$ref": "#/responses/notFound" - - deleteConversationComment(ctx) -} - func deleteConversationComment(ctx *context.APIContext) { comment, err := conversations_model.GetCommentByID(ctx, ctx.PathParamInt64(":id")) if err != nil {