diff --git a/service/app/api/v1/__init__.py b/service/app/api/v1/__init__.py index 922aa703..6ab5c70c 100644 --- a/service/app/api/v1/__init__.py +++ b/service/app/api/v1/__init__.py @@ -86,7 +86,7 @@ async def root() -> RootResponse: v1_router.include_router(agents_router, prefix="/agents") v1_router.include_router(mcps_router, prefix="/mcps") -v1_router.include_router(redemption_router, prefix="/business", tags=["business"]) +v1_router.include_router(redemption_router, prefix="/redemption", tags=["redemption"]) v1_router.include_router(checkin_router, prefix="/checkin") v1_router.include_router(files_router, prefix="/files") v1_router.include_router(folders_router, prefix="/folders") diff --git a/service/uv.lock b/service/uv.lock index 953f43cc..3c2359ce 100644 --- a/service/uv.lock +++ b/service/uv.lock @@ -2767,7 +2767,7 @@ wheels = [ [[package]] name = "service" -version = "1.0.2" +version = "1.0.5" source = { virtual = "." } dependencies = [ { name = "aioboto3" }, diff --git a/web/src/service/redemptionService.ts b/web/src/service/redemptionService.ts index e52f8e34..d2d2dff5 100644 --- a/web/src/service/redemptionService.ts +++ b/web/src/service/redemptionService.ts @@ -95,7 +95,7 @@ class RedemptionService { */ async redeemCode(code: string): Promise { const response = await fetch( - `${this.getBackendUrl()}/xyzen/api/v1/business/redeem`, + `${this.getBackendUrl()}/xyzen/api/v1/redemption/redeem`, { method: "POST", headers: this.createAuthHeaders(), @@ -118,7 +118,7 @@ class RedemptionService { */ async getUserWallet(): Promise { const response = await fetch( - `${this.getBackendUrl()}/xyzen/api/v1/business/wallet`, + `${this.getBackendUrl()}/xyzen/api/v1/redemption/wallet`, { method: "GET", headers: this.createAuthHeaders(), @@ -143,7 +143,7 @@ class RedemptionService { offset = 0, ): Promise { const response = await fetch( - `${this.getBackendUrl()}/xyzen/api/v1/business/history?limit=${limit}&offset=${offset}`, + `${this.getBackendUrl()}/xyzen/api/v1/redemption/history?limit=${limit}&offset=${offset}`, { method: "GET", headers: this.createAuthHeaders(), @@ -169,7 +169,7 @@ class RedemptionService { tz?: string, ): Promise { const url = new URL( - `${this.getBackendUrl()}/xyzen/api/v1/business/admin/stats/daily-tokens`, + `${this.getBackendUrl()}/xyzen/api/v1/redemption/admin/stats/daily-tokens`, ); if (date) { url.searchParams.append("date", date); @@ -204,7 +204,7 @@ class RedemptionService { limit = 20, ): Promise { const response = await fetch( - `${this.getBackendUrl()}/xyzen/api/v1/business/admin/stats/top-users?limit=${limit}`, + `${this.getBackendUrl()}/xyzen/api/v1/redemption/admin/stats/top-users?limit=${limit}`, { method: "GET", headers: { @@ -236,7 +236,7 @@ class RedemptionService { offset = 0, ): Promise { const url = new URL( - `${this.getBackendUrl()}/xyzen/api/v1/business/admin/stats/consume-records`, + `${this.getBackendUrl()}/xyzen/api/v1/redemption/admin/stats/consume-records`, ); if (startDate) { url.searchParams.append("start_date", startDate); @@ -314,7 +314,7 @@ class RedemptionService { tz?: string, ): Promise { const url = new URL( - `${this.getBackendUrl()}/xyzen/api/v1/business/admin/stats/user-activity`, + `${this.getBackendUrl()}/xyzen/api/v1/redemption/admin/stats/user-activity`, ); if (startDate) { url.searchParams.append("start_date", startDate);