Add: shared skeleton, dark toggle bg, fixed: multi select patching issue
This commit is contained in:
@@ -16,7 +16,7 @@ export const customersService = {
|
||||
const response = await api.get(API_ENDPOINTS.CUSTOMERS.READ_ALL, {
|
||||
params,
|
||||
});
|
||||
return CustomerListResponseSchema.parse(response.data);
|
||||
return response.data
|
||||
} catch (error) {
|
||||
console.error("ERROR caught in Customers Services Read all:", error);
|
||||
throw error;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import api from "../axios";
|
||||
import { API_ENDPOINTS } from "../endpoints";
|
||||
import {
|
||||
AdminListResponseSchema,
|
||||
ApiResponse,
|
||||
IAdminListResponse,
|
||||
ICreateAdminCredentials,
|
||||
@@ -14,7 +13,7 @@ import {
|
||||
|
||||
export const userService = {
|
||||
login: async (
|
||||
credentials: ILoginCredentials
|
||||
credentials: ILoginCredentials,
|
||||
): Promise<ApiResponse<ILoginResponse>> => {
|
||||
try {
|
||||
const response = await api.post(API_ENDPOINTS.USER.LOGIN, credentials);
|
||||
@@ -35,11 +34,11 @@ export const userService = {
|
||||
}
|
||||
},
|
||||
adminsList: async (
|
||||
params?: Record<string, any>
|
||||
params?: Record<string, any>,
|
||||
): Promise<ApiResponse<IAdminListResponse>> => {
|
||||
try {
|
||||
const response = await api.get(API_ENDPOINTS.USER.ADMINS, { params });
|
||||
return AdminListResponseSchema.parse(response.data);
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
console.error("ERROR caught in User Service User List", error);
|
||||
throw error;
|
||||
@@ -79,7 +78,7 @@ export const userService = {
|
||||
}
|
||||
},
|
||||
deleteAdmin: async (
|
||||
id: string
|
||||
id: string,
|
||||
): Promise<ApiResponse<{ message: string }>> => {
|
||||
try {
|
||||
return await api.delete(`${API_ENDPOINTS.USER.ADMINS}/${id}`);
|
||||
|
||||
Reference in New Issue
Block a user