Skip to main content

handle_host_google

Function handle_host_google 

Source
pub(crate) async fn handle_host_google(
    __arg0: State<AppState>,
    headers: HeaderMap,
    __arg2: Json<Value>,
) -> Response
Expand description

POST /api/v1/host/google: the account panel’s operations, from the host only. (Agents turn services on and off through POST /api/v1/google/grant.)

  • account { account_id }: the agents bound to it with their levels, and its call log.
  • set { account_id, agent_id, service, level }: read, write or off.
  • pick { account_id }: open Google’s file picker for the person; answers { session_id } to poll with account.oauth.poll.