"use strict";async function deleteComment(e){await db_1.models.comment.destroy({where:{id:e}});return{message:"Comment deleted successfully"}}Object.defineProperty(exports,"__esModule",{value:!0});exports.metadata=void 0;exports.deleteComment=deleteComment;const db_1=require("@b/db"),query_1=require("@b/utils/query");exports.metadata={summary:"Deletes a blog comment",description:"This endpoint deletes a blog comment.",operationId:"deleteComment",tags:["Blog"],logModule:"BLOG",logTitle:"Delete comment",requiresAuth:!0,parameters:[{index:0,name:"id",in:"path",description:"The ID of the comment to delete",required:!0,schema:{type:"string",description:"Comment ID"}}],responses:(0,query_1.deleteRecordResponses)("Comment")};exports.default=async e=>{const{ctx:t}=e;null==t||t.step("Deleting comment");const s=await deleteComment(e.params.id);null==t||t.success(`Comment ${e.params.id} deleted successfully`);return s};