getLike static method

Future<int> getLike({
  1. required String roomId,
})

좋아요 개수 조회

Implementation

static Future<int> getLike({required String roomId}) async {
  var uri = ApiPath.getLike.toUri();
  var response = await post(uri, body: {'room_id': roomId});
  int result = json.decode(response.body)['like_cnt'];
  return result;
}