HomePhabricator
Diffusion Comm e1f05c7d2e87

[keyserver] Implement `getInitialReduxStateResponder`

Description

[keyserver] Implement getInitialReduxStateResponder

Summary:
ENG-4751
Depends on D9122

Implementation of the getInitialReduxStateResponder. This is mostly code copied from website-responders, with a few changes that I annotated with inline comments.

Test Plan:
Added this code in web:

const getInitialReduxState =
  (
    callServerEndpoint: CallServerEndpoint,
  ): (URLInfo => Promise<InitialReduxState>) =>
  async urlInfo => {
    const response = await callServerEndpoint(
      'get_initial_redux_state',
      urlInfo,
    );
    return {
      navInfo: response.navInfo,
      <... omitted for brewity ...>
      keyserverInfo: response.keyserverInfo,
    };
  };

called it and checked if it returned expected fields.

Reviewers: inka, kamil, atul

Reviewed By: kamil

Subscribers: ashoat, tomek

Differential Revision: https://phab.comm.dev/D9124

Details