## 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/decide.py
team = request.user.team
    if team and on_permitted_domain(team, request):
        response: Dict[str, Any] = {"isAuthenticated": True}
        editor_params = {}
        if request.user.toolbar_mode != "disabled":
            editor_params["toolbarVersion"] = "toolbar"
        if settings.JS_URL:
            editor_params["jsURL"] = settings.JS_URL
        response["editorParams"] = editor_params
        return response, not request.user.temporary_token
    else:
        return {}, False
def get_team_from_token(request: HttpRequest, data_from_request: Dict[str, Any]) -> Union[Team, None]:
    data = data_from_request["data"]
    if not data:
        return None
    token = _get_token(data, request)
    is_personal_api_key = False
    if not token:
        token = PersonalAPIKeyAuthentication.find_key(
            request, data_from_request["body"], data if isinstance(data, dict) else None
        )
        is_personal_api_key = True
    if token:
        return Team.objects.get_team_from_token(token, is_personal_api_key)
    return None
def feature_flags(request: HttpRequest, team: Team, data: Dict[str, Any]) -> List[str]: