done
This commit is contained in:
parent
8ef2970c25
commit
ffb97d70b9
|
@ -0,0 +1 @@
|
|||
NEXT_PUBLIC_API_URL="http://localhost:8080"
|
|
@ -0,0 +1 @@
|
|||
NEXT_PUBLIC_API_URL="https://erp.julongindonesia.com:8443/api"
|
|
@ -0,0 +1,5 @@
|
|||
export const config = {
|
||||
api: {
|
||||
baseApiUrl: process.env.NEXT_PUBLIC_API_URL as string,
|
||||
}
|
||||
};
|
|
@ -1,9 +1,11 @@
|
|||
import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react'
|
||||
import { AttendanceRange, AttendanceSummary, EmployeeSummary, FilterOptions, MonthlyAttendance, MonthlyEmployee, ResignationCategory, ResignationReason, ResignationType as ResignationType, ResignSummary, User } from './types'
|
||||
import { Response , Filter} from './types'
|
||||
import { config } from '@/config';
|
||||
|
||||
|
||||
export const api = createApi({
|
||||
baseQuery: fetchBaseQuery({ baseUrl: 'http://localhost:8080' }),
|
||||
baseQuery: fetchBaseQuery({ baseUrl: config.api.baseApiUrl }),
|
||||
endpoints: (builder) => ({
|
||||
login: builder.mutation<{
|
||||
user: User;
|
||||
|
|
Loading…
Reference in New Issue