user.js 305 B

123456789101112131415161718
  1. import { axios } from "@/requests/axios.config";
  2. const prefix = "/user";
  3. function loginAPI(data) {
  4. return axios.post(`${prefix}/login`, data);
  5. }
  6. function registerAPI(data) {
  7. return axios.post(`${prefix}/register`, data);
  8. }
  9. const userAPIs = {
  10. loginAPI,
  11. registerAPI,
  12. };
  13. export default userAPIs;