1// Copyright 2020 The Fuchsia Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
45use crate::feedback_data_provider::facade::FeedbackDataProviderFacade;
6use crate::feedback_data_provider::types::*;
7use crate::server::Facade;
8use anyhow::Error;
9use async_trait::async_trait;
10use serde_json::Value;
1112#[async_trait(?Send)]
13impl Facade for FeedbackDataProviderFacade {
14async fn handle_request(&self, method: String, _args: Value) -> Result<Value, Error> {
15match method.parse()? {
16 FeedbackDataProviderMethod::GetSnapshot => self.get_snapshot().await,
17 }
18 }
19}