From 75fbf3fe4dd8ef29adffceeea1a992b09c554aae Mon Sep 17 00:00:00 2001 From: Stephen Liu Date: Thu, 6 Nov 2025 18:03:58 -0500 Subject: [PATCH 1/2] unit tests --- .../src/tests/services/auth.service.test.js | 132 ++++++++++++++ .../src/tests/services/menu.service.test.js | 171 ++++++++++++++++++ .../tests/services/profile.service.test.js | 145 +++++++++++++++ .../tests/services/restaurant.service.test.js | 125 +++++++++++++ .../src/tests/services/user.service.test.js | 142 +++++++++++++++ 5 files changed, 715 insertions(+) create mode 100644 proj2/Ecobites/client/src/tests/services/auth.service.test.js create mode 100644 proj2/Ecobites/client/src/tests/services/menu.service.test.js create mode 100644 proj2/Ecobites/client/src/tests/services/profile.service.test.js create mode 100644 proj2/Ecobites/client/src/tests/services/restaurant.service.test.js create mode 100644 proj2/Ecobites/client/src/tests/services/user.service.test.js diff --git a/proj2/Ecobites/client/src/tests/services/auth.service.test.js b/proj2/Ecobites/client/src/tests/services/auth.service.test.js new file mode 100644 index 000000000..8fcd35b83 --- /dev/null +++ b/proj2/Ecobites/client/src/tests/services/auth.service.test.js @@ -0,0 +1,132 @@ +import { vi, describe, it, expect, beforeEach } from 'vitest'; +import api from '../../api/axios.config'; +import { authService } from '../../api/services/auth.service'; + +vi.mock('../../api/axios.config'); + +describe('authService', () => { + beforeEach(() => { + vi.resetAllMocks(); + }); + + describe('register', () => { + it('calls POST /auth/register with user data', async () => { + const userData = { name: 'John', email: 'john@test.com', password: 'pass123' }; + api.post.mockResolvedValue({ data: { user: userData, token: 'abc123' } }); + + const res = await authService.register(userData); + + expect(api.post).toHaveBeenCalledWith('/auth/register', userData); + expect(res).toEqual({ user: userData, token: 'abc123' }); + }); + + it('handles registration with all required fields', async () => { + const userData = { + name: 'Jane Doe', + email: 'jane@test.com', + password: 'secure123', + phone: '555-1234', + role: 'customer' + }; + api.post.mockResolvedValue({ data: { user: userData, token: 'xyz789' } }); + + const res = await authService.register(userData); + + expect(api.post).toHaveBeenCalledWith('/auth/register', userData); + expect(res.user).toEqual(userData); + }); + + it('throws error on failed registration', async () => { + const userData = { email: 'bad@test.com', password: 'weak' }; + api.post.mockRejectedValue(new Error('Registration failed')); + + await expect(authService.register(userData)).rejects.toThrow('Registration failed'); + }); + }); + + describe('login', () => { + it('calls POST /auth/login with credentials', async () => { + const credentials = { email: 'user@test.com', password: 'pass123' }; + api.post.mockResolvedValue({ data: { user: { id: '1', email: credentials.email } } }); + + const res = await authService.login(credentials); + + expect(api.post).toHaveBeenCalledWith('/auth/login', credentials); + expect(res.user.email).toBe(credentials.email); + }); + + it('returns user data on successful login', async () => { + const credentials = { email: 'john@test.com', password: 'pass123' }; + const userData = { id: '1', name: 'John', email: 'john@test.com', role: 'customer' }; + api.post.mockResolvedValue({ data: { user: userData } }); + + const res = await authService.login(credentials); + + expect(res.user).toEqual(userData); + }); + + it('throws error on invalid credentials', async () => { + api.post.mockRejectedValue(new Error('Invalid credentials')); + + await expect(authService.login({ email: 'bad@test.com', password: 'wrong' })) + .rejects.toThrow('Invalid credentials'); + }); + }); + + describe('logout', () => { + it('calls POST /auth/logout', async () => { + api.post.mockResolvedValue({ data: { success: true } }); + + await authService.logout(); + + expect(api.post).toHaveBeenCalledWith('/auth/logout'); + }); + + it('handles logout without errors', async () => { + api.post.mockResolvedValue({ data: {} }); + + await expect(authService.logout()).resolves.not.toThrow(); + }); + + it('throws error if logout fails', async () => { + api.post.mockRejectedValue(new Error('Logout failed')); + + await expect(authService.logout()).rejects.toThrow('Logout failed'); + }); + }); + + describe('fetchMe', () => { + it('calls GET /auth/me', async () => { + const user = { id: '1', name: 'John', email: 'john@test.com' }; + api.get.mockResolvedValue({ data: { user } }); + + const res = await authService.fetchMe(); + + expect(api.get).toHaveBeenCalledWith('/auth/me'); + expect(res).toEqual(user); + }); + + it('returns user data from response', async () => { + const user = { id: '2', name: 'Jane', email: 'jane@test.com', role: 'restaurant' }; + api.get.mockResolvedValue({ data: { user } }); + + const res = await authService.fetchMe(); + + expect(res).toEqual(user); + }); + + it('returns undefined when user is not in response', async () => { + api.get.mockResolvedValue({ data: {} }); + + const res = await authService.fetchMe(); + + expect(res).toBeUndefined(); + }); + + it('throws error when request fails', async () => { + api.get.mockRejectedValue(new Error('Unauthorized')); + + await expect(authService.fetchMe()).rejects.toThrow('Unauthorized'); + }); + }); +}); diff --git a/proj2/Ecobites/client/src/tests/services/menu.service.test.js b/proj2/Ecobites/client/src/tests/services/menu.service.test.js new file mode 100644 index 000000000..3461dbe56 --- /dev/null +++ b/proj2/Ecobites/client/src/tests/services/menu.service.test.js @@ -0,0 +1,171 @@ +import { vi, describe, it, expect, beforeEach } from 'vitest'; +import api from '../../api/axios.config'; +import { menuService } from '../../api/services/menu.service'; + +vi.mock('../../api/axios.config'); + +describe('menuService', () => { + beforeEach(() => { + vi.resetAllMocks(); + }); + + describe('getByRestaurant', () => { + it('calls GET /menu/restaurant/:restaurantId', async () => { + const menuItems = [{ id: '1', name: 'Pizza' }, { id: '2', name: 'Pasta' }]; + api.get.mockResolvedValue({ data: menuItems }); + + const res = await menuService.getByRestaurant('rest123'); + + expect(api.get).toHaveBeenCalledWith('/menu/restaurant/rest123'); + expect(res).toEqual(menuItems); + }); + + it('returns empty array when restaurant has no menu items', async () => { + api.get.mockResolvedValue({ data: [] }); + + const res = await menuService.getByRestaurant('rest456'); + + expect(res).toEqual([]); + }); + }); + + describe('getSeasonalByRestaurant', () => { + it('calls GET /menu/restaurant/:restaurantId/seasonal', async () => { + const seasonalItems = [{ id: '1', name: 'Pumpkin Pie', isSeasonal: true }]; + api.get.mockResolvedValue({ data: seasonalItems }); + + const res = await menuService.getSeasonalByRestaurant('rest123'); + + expect(api.get).toHaveBeenCalledWith('/menu/restaurant/rest123/seasonal'); + expect(res).toEqual(seasonalItems); + }); + + it('returns seasonal items for specific restaurant', async () => { + const items = [ + { id: '1', name: 'Summer Salad', isSeasonal: true }, + { id: '2', name: 'Winter Soup', isSeasonal: true } + ]; + api.get.mockResolvedValue({ data: items }); + + const res = await menuService.getSeasonalByRestaurant('rest789'); + + expect(res).toHaveLength(2); + }); + }); + + describe('getSeasonalAll', () => { + it('calls GET /menu/seasonal', async () => { + const allSeasonal = [{ id: '1', name: 'Holiday Special' }]; + api.get.mockResolvedValue({ data: allSeasonal }); + + const res = await menuService.getSeasonalAll(); + + expect(api.get).toHaveBeenCalledWith('/menu/seasonal'); + expect(res).toEqual(allSeasonal); + }); + + it('returns all seasonal items across restaurants', async () => { + api.get.mockResolvedValue({ data: [] }); + + const res = await menuService.getSeasonalAll(); + + expect(res).toEqual([]); + }); + }); + + describe('create', () => { + it('calls POST /menu with menu data', async () => { + const menuData = { name: 'Burger', price: 12.99, restaurantId: 'rest1' }; + api.post.mockResolvedValue({ data: { id: 'menu1', ...menuData } }); + + const res = await menuService.create(menuData); + + expect(api.post).toHaveBeenCalledWith('/menu', menuData); + expect(res.name).toBe('Burger'); + }); + + it('creates menu item with all fields', async () => { + const menuData = { + name: 'Deluxe Pizza', + price: 18.99, + description: 'A delicious pizza', + restaurantId: 'rest1', + category: 'Main', + isAvailable: true + }; + api.post.mockResolvedValue({ data: { id: 'menu2', ...menuData } }); + + const res = await menuService.create(menuData); + + expect(res.description).toBe('A delicious pizza'); + expect(res.isAvailable).toBe(true); + }); + }); + + describe('update', () => { + it('calls PUT /menu/:id with updated data', async () => { + const menuData = { name: 'Updated Burger', price: 14.99 }; + api.put.mockResolvedValue({ data: { id: 'menu1', ...menuData } }); + + const res = await menuService.update('menu1', menuData); + + expect(api.put).toHaveBeenCalledWith('/menu/menu1', menuData); + expect(res.price).toBe(14.99); + }); + + it('updates menu item successfully', async () => { + const updated = { name: 'Premium Pizza', price: 22.99 }; + api.put.mockResolvedValue({ data: { id: 'menu3', ...updated } }); + + const res = await menuService.update('menu3', updated); + + expect(res.name).toBe('Premium Pizza'); + }); + }); + + describe('delete', () => { + it('calls DELETE /menu/:id', async () => { + api.delete.mockResolvedValue({ data: { success: true } }); + + const res = await menuService.delete('menu1'); + + expect(api.delete).toHaveBeenCalledWith('/menu/menu1'); + expect(res.success).toBe(true); + }); + + it('deletes menu item and returns confirmation', async () => { + api.delete.mockResolvedValue({ data: { message: 'Item deleted' } }); + + const res = await menuService.delete('menu5'); + + expect(res.message).toBe('Item deleted'); + }); + }); + + describe('toggleAvailability', () => { + it('calls PATCH /menu/:id with isAvailable flag', async () => { + api.patch.mockResolvedValue({ data: { id: 'menu1', isAvailable: false } }); + + const res = await menuService.toggleAvailability('menu1', false); + + expect(api.patch).toHaveBeenCalledWith('/menu/menu1', { isAvailable: false }); + expect(res.isAvailable).toBe(false); + }); + + it('sets item as available', async () => { + api.patch.mockResolvedValue({ data: { id: 'menu2', isAvailable: true } }); + + const res = await menuService.toggleAvailability('menu2', true); + + expect(res.isAvailable).toBe(true); + }); + + it('sets item as unavailable', async () => { + api.patch.mockResolvedValue({ data: { id: 'menu3', isAvailable: false } }); + + const res = await menuService.toggleAvailability('menu3', false); + + expect(res.isAvailable).toBe(false); + }); + }); +}); diff --git a/proj2/Ecobites/client/src/tests/services/profile.service.test.js b/proj2/Ecobites/client/src/tests/services/profile.service.test.js new file mode 100644 index 000000000..40e0b7f1c --- /dev/null +++ b/proj2/Ecobites/client/src/tests/services/profile.service.test.js @@ -0,0 +1,145 @@ +import { vi, describe, it, expect, beforeEach } from 'vitest'; +import api from '../../api/axios.config'; +import { profileService } from '../../api/services/profile.service'; + +vi.mock('../../api/axios.config'); + +describe('profileService', () => { + beforeEach(() => { + vi.resetAllMocks(); + }); + + describe('geocodeAddress', () => { + it('calls POST /profile/geocode with address data', async () => { + const addressData = { + street: '123 Main St', + city: 'New York', + state: 'NY', + zipCode: '10001' + }; + const geocodeResponse = { + ...addressData, + coordinates: { lat: 40.7128, lng: -74.0060 } + }; + api.post.mockResolvedValue({ data: geocodeResponse }); + + const res = await profileService.geocodeAddress(addressData); + + expect(api.post).toHaveBeenCalledWith('/profile/geocode', addressData); + expect(res).toEqual(geocodeResponse); + }); + + it('returns coordinates for valid address', async () => { + const addressData = { street: '456 Oak Ave', city: 'Boston', zipCode: '02101' }; + api.post.mockResolvedValue({ + data: { + ...addressData, + coordinates: { lat: 42.3601, lng: -71.0589 } + } + }); + + const res = await profileService.geocodeAddress(addressData); + + expect(res.coordinates).toBeDefined(); + expect(res.coordinates.lat).toBe(42.3601); + expect(res.coordinates.lng).toBe(-71.0589); + }); + + it('handles geocoding without saving to profile', async () => { + const addressData = { street: '789 Pine Rd', city: 'Seattle', zipCode: '98101' }; + api.post.mockResolvedValue({ data: { ...addressData, coordinates: { lat: 47.6062, lng: -122.3321 } } }); + + await profileService.geocodeAddress(addressData); + + expect(api.post).toHaveBeenCalledWith('/profile/geocode', addressData); + }); + + it('throws error on invalid address', async () => { + const addressData = { street: 'Invalid', city: 'Unknown', zipCode: '00000' }; + api.post.mockRejectedValue(new Error('Geocoding failed')); + + await expect(profileService.geocodeAddress(addressData)).rejects.toThrow('Geocoding failed'); + }); + }); + + describe('updateAddress', () => { + it('calls POST /profile/address with address data', async () => { + const addressData = { + street: '123 Main St', + city: 'New York', + zipCode: '10001' + }; + const response = { + success: true, + address: { + ...addressData, + coordinates: { lat: 40.7128, lng: -74.0060 } + } + }; + api.post.mockResolvedValue({ data: response }); + + const res = await profileService.updateAddress(addressData); + + expect(api.post).toHaveBeenCalledWith('/profile/address', addressData); + expect(res).toEqual(response); + }); + + it('saves address to user profile', async () => { + const addressData = { street: '456 Elm St', city: 'Los Angeles', zipCode: '90001' }; + api.post.mockResolvedValue({ + data: { + success: true, + address: { ...addressData, coordinates: { lat: 34.0522, lng: -118.2437 } } + } + }); + + const res = await profileService.updateAddress(addressData); + + expect(res.success).toBe(true); + expect(res.address.street).toBe('456 Elm St'); + }); + + it('returns updated address with coordinates', async () => { + const addressData = { street: '789 Oak Blvd', city: 'Chicago', zipCode: '60601' }; + const coords = { lat: 41.8781, lng: -87.6298 }; + api.post.mockResolvedValue({ + data: { + success: true, + address: { ...addressData, coordinates: coords } + } + }); + + const res = await profileService.updateAddress(addressData); + + expect(res.address.coordinates).toEqual(coords); + }); + + it('handles full address with all fields', async () => { + const addressData = { + street: '321 Maple Dr', + city: 'Houston', + state: 'TX', + zipCode: '77001', + apt: '5B' + }; + api.post.mockResolvedValue({ + data: { + success: true, + address: { ...addressData, coordinates: { lat: 29.7604, lng: -95.3698 } } + } + }); + + const res = await profileService.updateAddress(addressData); + + expect(res.address.apt).toBe('5B'); + expect(res.address.state).toBe('TX'); + }); + + it('throws error when address update fails', async () => { + const addressData = { street: '', city: '', zipCode: '' }; + api.post.mockRejectedValue(new Error('Address update failed')); + + await expect(profileService.updateAddress(addressData)).rejects.toThrow('Address update failed'); + }); + }); +}); diff --git a/proj2/Ecobites/client/src/tests/services/restaurant.service.test.js b/proj2/Ecobites/client/src/tests/services/restaurant.service.test.js new file mode 100644 index 000000000..29437f34d --- /dev/null +++ b/proj2/Ecobites/client/src/tests/services/restaurant.service.test.js @@ -0,0 +1,125 @@ +import { vi, describe, it, expect, beforeEach } from 'vitest'; +import api from '../../api/axios.config'; +import { restaurantService } from '../../api/services/restaurant.service'; + +vi.mock('../../api/axios.config'); + +describe('restaurantService', () => { + beforeEach(() => { + vi.resetAllMocks(); + }); + + describe('getAll', () => { + it('calls GET /restaurants', async () => { + const restaurants = [ + { id: '1', name: 'Pizza Place' }, + { id: '2', name: 'Burger Joint' } + ]; + api.get.mockResolvedValue({ data: restaurants }); + + const res = await restaurantService.getAll(); + + expect(api.get).toHaveBeenCalledWith('/restaurants'); + expect(res).toEqual(restaurants); + }); + + it('returns all restaurants', async () => { + const restaurants = [ + { id: '1', name: 'Italian Bistro', cuisine: 'Italian' }, + { id: '2', name: 'Sushi Bar', cuisine: 'Japanese' }, + { id: '3', name: 'Taco Stand', cuisine: 'Mexican' } + ]; + api.get.mockResolvedValue({ data: restaurants }); + + const res = await restaurantService.getAll(); + + expect(res).toHaveLength(3); + expect(res[0].cuisine).toBe('Italian'); + }); + + it('returns empty array when no restaurants exist', async () => { + api.get.mockResolvedValue({ data: [] }); + + const res = await restaurantService.getAll(); + + expect(res).toEqual([]); + }); + }); + + describe('getById', () => { + it('calls GET /restaurants/:id', async () => { + const restaurant = { id: 'rest1', name: 'Great Food', cuisine: 'American' }; + api.get.mockResolvedValue({ data: restaurant }); + + const res = await restaurantService.getById('rest1'); + + expect(api.get).toHaveBeenCalledWith('/restaurants/rest1'); + expect(res).toEqual(restaurant); + }); + + it('returns restaurant details by ID', async () => { + const restaurant = { + id: 'rest2', + name: 'Thai Kitchen', + cuisine: 'Thai', + address: '123 Main St', + rating: 4.5 + }; + api.get.mockResolvedValue({ data: restaurant }); + + const res = await restaurantService.getById('rest2'); + + expect(res.name).toBe('Thai Kitchen'); + expect(res.rating).toBe(4.5); + }); + + it('throws error when restaurant not found', async () => { + api.get.mockRejectedValue(new Error('Restaurant not found')); + + await expect(restaurantService.getById('invalid')).rejects.toThrow('Restaurant not found'); + }); + }); + + describe('searchByCuisine', () => { + it('calls GET /restaurants with cuisine query parameter', async () => { + const italianRestaurants = [ + { id: '1', name: 'Pasta Palace', cuisine: 'Italian' }, + { id: '2', name: 'Pizza Roma', cuisine: 'Italian' } + ]; + api.get.mockResolvedValue({ data: italianRestaurants }); + + const res = await restaurantService.searchByCuisine('Italian'); + + expect(api.get).toHaveBeenCalledWith('/restaurants?cuisine=Italian'); + expect(res).toEqual(italianRestaurants); + }); + + it('returns restaurants filtered by cuisine type', async () => { + const mexicanRestaurants = [ + { id: '3', name: 'Taco Town', cuisine: 'Mexican' } + ]; + api.get.mockResolvedValue({ data: mexicanRestaurants }); + + const res = await restaurantService.searchByCuisine('Mexican'); + + expect(res).toHaveLength(1); + expect(res[0].cuisine).toBe('Mexican'); + }); + + it('returns empty array when no restaurants match cuisine', async () => { + api.get.mockResolvedValue({ data: [] }); + + const res = await restaurantService.searchByCuisine('Ethiopian'); + + expect(res).toEqual([]); + }); + + it('handles special characters in cuisine name', async () => { + api.get.mockResolvedValue({ data: [] }); + + await restaurantService.searchByCuisine('Chinese & Japanese'); + + expect(api.get).toHaveBeenCalledWith('/restaurants?cuisine=Chinese & Japanese'); + }); + }); +}); diff --git a/proj2/Ecobites/client/src/tests/services/user.service.test.js b/proj2/Ecobites/client/src/tests/services/user.service.test.js new file mode 100644 index 000000000..0f52812f2 --- /dev/null +++ b/proj2/Ecobites/client/src/tests/services/user.service.test.js @@ -0,0 +1,142 @@ +import { vi, describe, it, expect, beforeEach } from 'vitest'; +import api from '../../api/axios.config'; +import { userService } from '../../api/services/user.service'; + +vi.mock('../../api/axios.config'); + +describe('userService', () => { + beforeEach(() => { + vi.resetAllMocks(); + }); + + describe('getProfile', () => { + it('calls GET /users/:userId', async () => { + const userProfile = { + id: 'user1', + name: 'John Doe', + email: 'john@test.com', + role: 'customer' + }; + api.get.mockResolvedValue({ data: userProfile }); + + const res = await userService.getProfile('user1'); + + expect(api.get).toHaveBeenCalledWith('/users/user1'); + expect(res).toEqual(userProfile); + }); + + it('returns complete user profile data', async () => { + const profile = { + id: 'user2', + name: 'Jane Smith', + email: 'jane@test.com', + role: 'restaurant', + phone: '555-1234', + address: '123 Main St' + }; + api.get.mockResolvedValue({ data: profile }); + + const res = await userService.getProfile('user2'); + + expect(res.name).toBe('Jane Smith'); + expect(res.phone).toBe('555-1234'); + }); + + it('throws error when user not found', async () => { + api.get.mockRejectedValue(new Error('User not found')); + + await expect(userService.getProfile('invalid')).rejects.toThrow('User not found'); + }); + }); + + describe('updateProfile', () => { + it('calls PUT /users/:userId with updated data', async () => { + const userData = { name: 'John Updated', phone: '555-9999' }; + const updatedProfile = { id: 'user1', ...userData }; + api.put.mockResolvedValue({ data: updatedProfile }); + + const res = await userService.updateProfile('user1', userData); + + expect(api.put).toHaveBeenCalledWith('/users/user1', userData); + expect(res).toEqual(updatedProfile); + }); + + it('updates user name', async () => { + const userData = { name: 'New Name' }; + api.put.mockResolvedValue({ data: { id: 'user1', name: 'New Name' } }); + + const res = await userService.updateProfile('user1', userData); + + expect(res.name).toBe('New Name'); + }); + + it('updates user phone number', async () => { + const userData = { phone: '555-7777' }; + api.put.mockResolvedValue({ data: { id: 'user2', phone: '555-7777' } }); + + const res = await userService.updateProfile('user2', userData); + + expect(res.phone).toBe('555-7777'); + }); + + it('updates multiple user fields', async () => { + const userData = { + name: 'Updated Name', + phone: '555-8888', + email: 'updated@test.com' + }; + api.put.mockResolvedValue({ data: { id: 'user3', ...userData } }); + + const res = await userService.updateProfile('user3', userData); + + expect(res.name).toBe('Updated Name'); + expect(res.email).toBe('updated@test.com'); + }); + + it('throws error on failed update', async () => { + api.put.mockRejectedValue(new Error('Update failed')); + + await expect(userService.updateProfile('user1', {})).rejects.toThrow('Update failed'); + }); + }); + + describe('updateDriverAvailability', () => { + it('calls PATCH /users/:driverId/availability', async () => { + api.patch.mockResolvedValue({ + data: { id: 'driver1', isAvailable: true } + }); + + const res = await userService.updateDriverAvailability('driver1', true); + + expect(api.patch).toHaveBeenCalledWith('/users/driver1/availability', { isAvailable: true }); + expect(res.isAvailable).toBe(true); + }); + + it('sets driver as available', async () => { + api.patch.mockResolvedValue({ + data: { id: 'driver2', isAvailable: true, status: 'online' } + }); + + const res = await userService.updateDriverAvailability('driver2', true); + + expect(res.isAvailable).toBe(true); + }); + + it('sets driver as unavailable', async () => { + api.patch.mockResolvedValue({ + data: { id: 'driver3', isAvailable: false, status: 'offline' } + }); + + const res = await userService.updateDriverAvailability('driver3', false); + + expect(res.isAvailable).toBe(false); + }); + + it('throws error when driver not found', async () => { + api.patch.mockRejectedValue(new Error('Driver not found')); + + await expect(userService.updateDriverAvailability('invalid', true)) + .rejects.toThrow('Driver not found'); + }); + }); +}); From b4aa8ec522fd5ebde265865b86e32104c69d1db5 Mon Sep 17 00:00:00 2001 From: Stephen Liu Date: Thu, 6 Nov 2025 18:11:06 -0500 Subject: [PATCH 2/2] fixed axios config route --- proj2/Ecobites/client/src/api/services/user.service.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proj2/Ecobites/client/src/api/services/user.service.js b/proj2/Ecobites/client/src/api/services/user.service.js index e9d408ecd..0ffbaefc8 100644 --- a/proj2/Ecobites/client/src/api/services/user.service.js +++ b/proj2/Ecobites/client/src/api/services/user.service.js @@ -1,4 +1,4 @@ -import api from '../config/axios.config'; +import api from '../axios.config'; export const userService = { getProfile: async (userId) => {