website/lib/api_urls.ts

26 lines
1.0 KiB
TypeScript
Raw Normal View History

// Get API base URL from environment variable
export const API_BASE_URL = process.env.NEXT_PUBLIC_API_URL;
export const API_ENDPOINTS = {
auth: {
base: `${API_BASE_URL}/auth/`,
register: `${API_BASE_URL}/auth/register/`,
verifyOtp: `${API_BASE_URL}/auth/verify-otp/`,
login: `${API_BASE_URL}/auth/login/`,
resendOtp: `${API_BASE_URL}/auth/resend-otp/`,
forgotPassword: `${API_BASE_URL}/auth/forgot-password/`,
verifyPasswordResetOtp: `${API_BASE_URL}/auth/verify-password-reset-otp/`,
resetPassword: `${API_BASE_URL}/auth/reset-password/`,
tokenRefresh: `${API_BASE_URL}/auth/token/refresh/`,
allUsers: `${API_BASE_URL}/auth/all-users/`,
},
meetings: {
base: `${API_BASE_URL}/meetings/`,
availableDates: `${API_BASE_URL}/meetings/appointments/available-dates/`,
createAppointment: `${API_BASE_URL}/meetings/appointments/create/`,
listAppointments: `${API_BASE_URL}/meetings/appointments/`,
userAppointments: `${API_BASE_URL}/meetings/user/appointments/`,
},
} as const;