Skip to content

Commit 8b649de

Browse files
committed
feat: add comment management for tutorials and posts, including handlers, models, and repository interactions.
1 parent ab913d1 commit 8b649de

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

backend/src/handlers/comments.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ pub async fn list_comments(
161161
}
162162

163163
pub async fn create_comment(
164-
claims: Option<auth::Claims>,
165164
State(pool): State<DbPool>,
166165
Path(tutorial_id): Path<String>,
167166
Json(payload): Json<CreateCommentRequest>,
@@ -183,7 +182,7 @@ pub async fn create_comment(
183182
return Err((StatusCode::NOT_FOUND, Json(ErrorResponse { error: "Tutorial not found".to_string() })));
184183
}
185184

186-
create_comment_internal(pool, Some(tutorial_id), None, payload, claims).await
185+
create_comment_internal(pool, Some(tutorial_id), None, payload, None).await
187186
}
188187

189188
pub async fn list_post_comments(
@@ -228,7 +227,6 @@ pub async fn list_post_comments(
228227
}
229228

230229
pub async fn create_post_comment(
231-
claims: Option<auth::Claims>,
232230
State(pool): State<DbPool>,
233231
Path(post_id): Path<String>,
234232
Json(payload): Json<CreateCommentRequest>,
@@ -246,7 +244,7 @@ pub async fn create_post_comment(
246244
return Err((StatusCode::NOT_FOUND, Json(ErrorResponse { error: "Post not found".to_string() })));
247245
}
248246

249-
create_comment_internal(pool, None, Some(post_id), payload, claims).await
247+
create_comment_internal(pool, None, Some(post_id), payload, None).await
250248
}
251249

252250
async fn create_comment_internal(

0 commit comments

Comments
 (0)