{"size": 514, "ext": "js", "max_stars_repo_path": "src/services/hexabase/user.js", "max_stars_repo_name": "ycatch/hexa-vue-example1", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/services/hexabase/user.js", "max_issues_repo_name": "ycatch/hexa-vue-example1", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/services/hexabase/user.js", "max_forks_repo_name": "ycatch/hexa-vue-example1", "max_forks_repo_forks_event_min_datetime": "2021-04-05T09:36:41.000Z", "max_forks_repo_forks_event_max_datetime": "2022-01-05T05:02:06.000Z"}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": 2, "avg_line_length": 19.7692307692, "max_line_length": 63, "alphanum_fraction": 0.6536964981}
import axios from "axios";

const login = async (email, password) => {
  const params = {
    email: email,
    password: password,
  };
  const result = await axios.post("/linker-api/login", params);
  return result.data.token;
};

const logout = async () => {
  await axios.post("/linker-api/users/logout");
};

const getUserInfo = async () => {
  const result = await axios.get("/linker-api/userinfo");
  return result.data;
};

export default {
  login: login,
  logout: logout,
  getUserInfo: getUserInfo,
};
