fix: resolve duplicate export errors in service lib (uploadUserFile, TLoginRequest, UserDetailResponseDto)
This commit is contained in:
@@ -1,12 +1,7 @@
|
||||
import { api } from '../index';
|
||||
import type { TLoginResponse, TRegisterRequest, TSendOTPRequest, TVerifyEmailRequest } from '../../types/auth';
|
||||
import type { TLoginRequest, TLoginResponse, TRegisterRequest, TSendOTPRequest, TVerifyEmailRequest } from '../../types/auth';
|
||||
import type { TResponseMessage } from '../../types/common';
|
||||
|
||||
export type TLoginRequest = {
|
||||
email: string;
|
||||
password: string;
|
||||
};
|
||||
|
||||
export type TForgotPasswordRequest = {
|
||||
email: string;
|
||||
};
|
||||
|
||||
@@ -21,8 +21,6 @@ const multipartPost = async (url: string, file: File, fieldName = 'file'): Promi
|
||||
return response.data.data;
|
||||
};
|
||||
|
||||
export const uploadUserFile = (file: File) => multipartPost('/v1/iam/users/upload', file);
|
||||
|
||||
export const uploadHackathonFile = (file: File) => multipartPost('/v1/hackathon/upload', file);
|
||||
|
||||
export const uploadHackathonAvatar = (file: File) => multipartPost('/v1/hackathon/upload/avatar', file);
|
||||
@@ -33,7 +31,7 @@ export const uploadHackathonSubmission = (file: File) => multipartPost('/v1/hack
|
||||
|
||||
// Legacy service object for backward compatibility
|
||||
export const uploadService = {
|
||||
uploadFile: uploadUserFile,
|
||||
uploadAvatar: uploadUserFile,
|
||||
uploadCV: uploadUserFile,
|
||||
uploadFile: (file: File) => multipartPost('/v1/iam/users/upload', file),
|
||||
uploadAvatar: (file: File) => multipartPost('/v1/iam/users/upload', file),
|
||||
uploadCV: (file: File) => multipartPost('/v1/iam/users/upload', file),
|
||||
};
|
||||
|
||||
@@ -8,9 +8,6 @@ import type {
|
||||
} from '../../types/users';
|
||||
import type { TApiPaginated, TPaginationParams } from '../../types/common';
|
||||
|
||||
// Re-export for backward compatibility
|
||||
export type UserDetailResponseDto = TUsersDetailItem;
|
||||
export type UserUpdateRequestDto = TUserUpdateRequest;
|
||||
|
||||
export type TUserMeInclude = 'hackathon' | 'qr' | 'mentor' | 'sessions';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user