break; case validateRoute('GET', 'invites'): $invite = new Invite($db, $user); httpResponse($invite->query()); break; case validateRoute('POST', 'invites'): $invite = new Invite($db, $user); httpResponse($invite->create()); break; case validateRoute('DELETE', 'invites/\\d+'): $invite = new Invite($db, $user); httpResponse($invite->delete((int) $params[1])); break; case validateRoute('GET', 'friends'): $friends = new Friends($db, $user); httpResponse($friends->query()); break; case validateRoute('POST', 'friends'): $friends = new Friends($db, $user); httpResponse($friends->create($postdata)); break; case validateRoute('DELETE', 'friends/\\d+'): $friends = new Friends($db, $user); httpResponse($friends->delete((int) $params[1])); break; case validateRoute('PATCH', 'friends/\\d+'): $friends = new Friends($db, $user); httpResponse($friends->update((int) $params[1]), $postdata); break; case validateRoute('GET', 'blocked'): $blocked = new Blocked($db, $user);