This commit is contained in:
fro1991
2025-02-01 19:49:27 +07:00
parent 42c2a8e481
commit 13a2c4d42c
57 changed files with 159 additions and 295 deletions

View File

@ -9,7 +9,7 @@ interface SaveLogsParams {
action: string;
}
const API_URL = apiConfig.service_user;
const API_URL = apiConfig.service_dashboard;
const getCurrentTimeJakarta = () => {
const jakartaTime = new Date().toLocaleString('id-ID', {
@ -38,7 +38,6 @@ export async function doSaveLogActivity(payload: SaveLogsParams): Promise<Action
refresh_token: token.refresh_token,
url: window.location.href,
data_body: getCurrentTimeJakarta(),
application: 'credit'
};
const response = await axios.post(`${API_URL}/user_activity/create`, dtParams);

View File

@ -1,7 +1,7 @@
import axios from 'axios';
import { apiConfig } from '@/config/api.config';
import { ActionMenuReponseTypes, RoleList } from '@/types/GlobalTypes';
const API_URL = apiConfig.service_user;
const API_URL = apiConfig.service_dashboard;
export async function doGetNavbarMenu(): Promise<ActionMenuReponseTypes> {
try {
@ -12,7 +12,7 @@ export async function doGetNavbarMenu(): Promise<ActionMenuReponseTypes> {
throw new Error('No authentication token found');
}
const response = await axios.put(`${API_URL}/renew_token/${token.refresh_token}/credit`);
const response = await axios.put(`${API_URL}/renew_token/${token.refresh_token}`);
if (response.status !== 200 || !response.data.status) {
throw new Error(response.data.message ?? 'Failed to fetch navbar menu');
}