## Bug description

Since users can now be part of multiple projects, the `get_team_from_token` function used in capture and decide endpoints cannot work reliably with personal API keys. These endpoints should be e.g. nested under `/api/projects/:project_id` _or_ should accept `project_id` in request body.

#### *Thank you* for your bug report – we love squashing them!

posthog/api/test/test_decide.py
filters={"properties": [{"key": "email", "value": "tim@posthog.com", "type": "person"}]},
            rollout_percentage=50,
            name="Filter by property",
            key="filer-by-property",
            created_by=self.user,
        )
        FeatureFlag.objects.create(
            team=self.team,
            filters={"properties": [{"key": "email", "value": "tim@posthog.com", "type": "person"}]},
            rollout_percentage=50,
            name="Filter by property 2",
            key="filer-by-property-2",
            created_by=self.user,
        )
        with self.assertNumQueries(5):
            response = self._post_decide()
        self.assertEqual(response["featureFlags"][0], "beta-feature")
        with self.assertNumQueries(5):
            response = self._post_decide({"token": self.team.api_token, "distinct_id": "another_id"})
        self.assertEqual(len(response["featureFlags"]), 0)
    def test_feature_flags_with_personal_api_key(self):
        key = PersonalAPIKey(label="X", user=self.user, team=self.team)
        key.save()
        Person.objects.create(team=self.team, distinct_ids=["example_id"])
        FeatureFlag.objects.create(
            team=self.team, rollout_percentage=100, name="Test", key="test", created_by=self.user,
        )
        response = self._post_decide({"distinct_id": "example_id", "personal_api_key": key.value})
        self.assertEqual(len(response["featureFlags"]), 1)