refactor: improve type safety by replacing any types with specific interfaces across API services and components.

This commit is contained in:
taDuc
2026-05-14 21:54:44 +07:00
parent dca3ca67ad
commit b220798978
20 changed files with 249 additions and 71 deletions
+10 -1
View File
@@ -121,7 +121,16 @@ export const deleteMediaById = async (mediaId: string) => {
return response?.data;
}
export const getMedia = async (payload: any) => {
export interface GetMediaPayload {
page?: number;
limit?: number;
search?: string;
sortBy?: string;
sortOrder?: "asc" | "desc";
user_id?: string;
}
export const getMedia = async (payload: GetMediaPayload) => {
const response = await api.get(API.Media.GET_MEDIA, {
params: payload,
});