{"size": 330, "ext": "js", "max_stars_repo_path": "src/ui-demo/src/client/resources/user/user.api.js", "max_stars_repo_name": "paralect/img-fly", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/ui-demo/src/client/resources/user/user.api.js", "max_issues_repo_name": "paralect/img-fly", "max_issues_repo_issues_event_min_datetime": "2018-04-16T11:33:16.000Z", "max_issues_repo_issues_event_max_datetime": "2018-04-16T13:02:23.000Z", "max_forks_repo_path": "src/ui-demo/src/client/resources/user/user.api.js", "max_forks_repo_name": "paralect/img-fly", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 4, "max_forks_count": null, "avg_line_length": 25.3846153846, "max_line_length": 77, "alphanum_fraction": 0.6151515152}
// @flow

import { apiClient } from 'helpers/api';
import type { StateType } from './user.types';

export const fetchUser = (id: string = ''): Promise<*> => {
  return apiClient.get(`/users/${id}`);
};

export const updateUser = (id: string = '', data: StateType): Promise<*> => {
  return apiClient.put(`/users/${id}`, data);
};
