♻️ refactor(api): update endpoints to include '/api' prefix and add new types for IP location and withdrawal logs
- Updated all user and common service endpoints to include '/api' prefix for consistency. - Added new API types for querying IP location and withdrawal logs. - Introduced commission withdrawal functionality in user service. - Enhanced user service typings to include rules and withdrawal log structures.
This commit is contained in:
@@ -7,7 +7,7 @@ export async function updatePaymentMethod(
|
||||
options?: { [key: string]: any }
|
||||
) {
|
||||
return request<API.Response & { data?: API.PaymentConfig }>(
|
||||
"/v1/admin/payment/",
|
||||
"/api/v1/admin/payment/",
|
||||
{
|
||||
method: "PUT",
|
||||
headers: {
|
||||
@@ -25,7 +25,7 @@ export async function createPaymentMethod(
|
||||
options?: { [key: string]: any }
|
||||
) {
|
||||
return request<API.Response & { data?: API.PaymentConfig }>(
|
||||
"/v1/admin/payment/",
|
||||
"/api/v1/admin/payment/",
|
||||
{
|
||||
method: "POST",
|
||||
headers: {
|
||||
@@ -42,7 +42,7 @@ export async function deletePaymentMethod(
|
||||
body: API.DeletePaymentMethodRequest,
|
||||
options?: { [key: string]: any }
|
||||
) {
|
||||
return request<API.Response & { data?: any }>("/v1/admin/payment/", {
|
||||
return request<API.Response & { data?: any }>("/api/v1/admin/payment/", {
|
||||
method: "DELETE",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
@@ -59,7 +59,7 @@ export async function getPaymentMethodList(
|
||||
options?: { [key: string]: any }
|
||||
) {
|
||||
return request<API.Response & { data?: API.GetPaymentMethodListResponse }>(
|
||||
"/v1/admin/payment/list",
|
||||
"/api/v1/admin/payment/list",
|
||||
{
|
||||
method: "GET",
|
||||
params: {
|
||||
@@ -73,7 +73,7 @@ export async function getPaymentMethodList(
|
||||
/** Get supported payment platform GET /v1/admin/payment/platform */
|
||||
export async function getPaymentPlatform(options?: { [key: string]: any }) {
|
||||
return request<API.Response & { data?: API.PlatformResponse }>(
|
||||
"/v1/admin/payment/platform",
|
||||
"/api/v1/admin/payment/platform",
|
||||
{
|
||||
method: "GET",
|
||||
...(options || {}),
|
||||
|
||||
Reference in New Issue
Block a user