♻️ 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:
@@ -6,7 +6,7 @@ export async function updateAnnouncement(
|
||||
body: API.UpdateAnnouncementRequest,
|
||||
options?: { [key: string]: any }
|
||||
) {
|
||||
return request<API.Response & { data?: any }>("/v1/admin/announcement/", {
|
||||
return request<API.Response & { data?: any }>("/api/v1/admin/announcement/", {
|
||||
method: "PUT",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
@@ -21,7 +21,7 @@ export async function createAnnouncement(
|
||||
body: API.CreateAnnouncementRequest,
|
||||
options?: { [key: string]: any }
|
||||
) {
|
||||
return request<API.Response & { data?: any }>("/v1/admin/announcement/", {
|
||||
return request<API.Response & { data?: any }>("/api/v1/admin/announcement/", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
@@ -36,7 +36,7 @@ export async function deleteAnnouncement(
|
||||
body: API.DeleteAnnouncementRequest,
|
||||
options?: { [key: string]: any }
|
||||
) {
|
||||
return request<API.Response & { data?: any }>("/v1/admin/announcement/", {
|
||||
return request<API.Response & { data?: any }>("/api/v1/admin/announcement/", {
|
||||
method: "DELETE",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
@@ -53,7 +53,7 @@ export async function getAnnouncement(
|
||||
options?: { [key: string]: any }
|
||||
) {
|
||||
return request<API.Response & { data?: API.Announcement }>(
|
||||
"/v1/admin/announcement/detail",
|
||||
"/api/v1/admin/announcement/detail",
|
||||
{
|
||||
method: "GET",
|
||||
params: {
|
||||
@@ -71,7 +71,7 @@ export async function getAnnouncementList(
|
||||
options?: { [key: string]: any }
|
||||
) {
|
||||
return request<API.Response & { data?: API.GetAnnouncementListResponse }>(
|
||||
"/v1/admin/announcement/list",
|
||||
"/api/v1/admin/announcement/list",
|
||||
{
|
||||
method: "GET",
|
||||
params: {
|
||||
|
||||
Reference in New Issue
Block a user