You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
export function useResponseSuccess<T = any>(data: T) {
|
|
return {
|
|
code: 0,
|
|
data,
|
|
error: null,
|
|
message: 'ok',
|
|
};
|
|
}
|
|
|
|
export function useResponseError(message: string, error: any = null) {
|
|
return {
|
|
code: -1,
|
|
data: null,
|
|
error,
|
|
message,
|
|
};
|
|
}
|