Skip to content

Commit

Permalink
fix: /chats/[chatId] jsonBody broken
Browse files Browse the repository at this point in the history
  • Loading branch information
MikkyBoy357 committed Aug 11, 2024
1 parent e3dce4d commit 13d128d
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions routes/api/chats/[chatId]/index.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import 'dart:convert';

import 'package:cats_backend/data/repositories/repositories.dart';
import 'package:cats_backend/data/request_handlers/request_handlers.dart';
import 'package:cats_backend/helpers/helpers.dart';
Expand All @@ -20,11 +18,6 @@ Future<Response> onRequest(RequestContext context, String id) async {

final saint = authValidationResponse.user!;

final body = await context.request.body();
print('LeBody ==> $body');
final bodyJson = jsonDecode(body) as Map<String, dynamic>;
print('LeJSON ==> $bodyJson');

final chatId = ObjectId.tryParse(id);
if (chatId == null) {
return Response.json(body: 'Error: Cannot Parse Invalid Chat ID.');
Expand Down

0 comments on commit 13d128d

Please sign in to comment.