fix(reward): add /api/v1 prefix to internal service API calls
Both referral-service and authorization-service use global prefix /api/v1, so the client calls need to include this prefix. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
9a823e8871
commit
e2b3f25dbc
|
|
@ -14,7 +14,7 @@ export class AuthorizationServiceClient implements IAuthorizationServiceClient {
|
|||
async findNearestAuthorizedProvince(userId: bigint, provinceCode: string): Promise<bigint | null> {
|
||||
try {
|
||||
const response = await fetch(
|
||||
`${this.baseUrl}/authorization/nearest-province?accountSequence=${userId}&provinceCode=${provinceCode}`,
|
||||
`${this.baseUrl}/api/v1/authorization/nearest-province?accountSequence=${userId}&provinceCode=${provinceCode}`,
|
||||
);
|
||||
|
||||
if (!response.ok) {
|
||||
|
|
@ -33,7 +33,7 @@ export class AuthorizationServiceClient implements IAuthorizationServiceClient {
|
|||
async findNearestAuthorizedCity(userId: bigint, cityCode: string): Promise<bigint | null> {
|
||||
try {
|
||||
const response = await fetch(
|
||||
`${this.baseUrl}/authorization/nearest-city?accountSequence=${userId}&cityCode=${cityCode}`,
|
||||
`${this.baseUrl}/api/v1/authorization/nearest-city?accountSequence=${userId}&cityCode=${cityCode}`,
|
||||
);
|
||||
|
||||
if (!response.ok) {
|
||||
|
|
@ -52,7 +52,7 @@ export class AuthorizationServiceClient implements IAuthorizationServiceClient {
|
|||
async findNearestCommunity(userId: bigint): Promise<bigint | null> {
|
||||
try {
|
||||
const response = await fetch(
|
||||
`${this.baseUrl}/authorization/nearest-community?accountSequence=${userId}`,
|
||||
`${this.baseUrl}/api/v1/authorization/nearest-community?accountSequence=${userId}`,
|
||||
);
|
||||
|
||||
if (!response.ok) {
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ export class ReferralServiceClient implements IReferralServiceClient {
|
|||
ancestors: Array<{ userId: bigint; hasPlanted: boolean }>;
|
||||
}> {
|
||||
try {
|
||||
const response = await fetch(`${this.baseUrl}/referral/chain/${userId}`);
|
||||
const response = await fetch(`${this.baseUrl}/api/v1/referral/chain/${userId}`);
|
||||
|
||||
if (!response.ok) {
|
||||
this.logger.warn(`Failed to get referral chain for user ${userId}: ${response.status}`);
|
||||
|
|
|
|||
Loading…
Reference in New Issue