update
This commit is contained in:
@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user