feat: enhance wallet functionality and improve error handling
- Updated .env.example to include optional player site code configuration. - Modified error messages in hall-bet-errors for better clarity. - Improved the betting grid logic to handle invalid draw IDs and reload draws when necessary. - Adjusted wallet components to differentiate between credit and main wallet balances, including new translations for credit-related terms. - Enhanced wallet logs to support credit activity tracking and improved UI for displaying credit information.
This commit is contained in:
26
src/api/player-auth.ts
Normal file
26
src/api/player-auth.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import { lotteryRequest } from "@/lib/lottery-http";
|
||||
|
||||
export type PlayerAuthLoginPayload = {
|
||||
site_code?: string;
|
||||
username: string;
|
||||
password: string;
|
||||
};
|
||||
|
||||
export type PlayerAuthLoginData = {
|
||||
access_token: string;
|
||||
expires_in: number;
|
||||
token_type: string;
|
||||
player: {
|
||||
id: number;
|
||||
site_code: string;
|
||||
username: string | null;
|
||||
nickname: string | null;
|
||||
funding_mode: string;
|
||||
auth_source: string;
|
||||
};
|
||||
};
|
||||
|
||||
/** `POST /api/v1/player/auth/login`(公开) */
|
||||
export function postPlayerAuthLogin(body: PlayerAuthLoginPayload): Promise<PlayerAuthLoginData> {
|
||||
return lotteryRequest.post<PlayerAuthLoginData>(`/player/auth/login`, body);
|
||||
}
|
||||
Reference in New Issue
Block a user