Skip to content

Commit 38546ff

Browse files
fix: update env names
1 parent 533ab02 commit 38546ff

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

src/utils/helpers.ts

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,18 @@ export async function findPlayerInfoByUuid(
9595

9696
export async function getTopRank(username: string): Promise<string | null> {
9797
const response = await (
98-
await fetch(`${process.env.HTTP_MAIN_COMMAND_SERVICE_BASE_URL}/get-ranks`, {
99-
method: "POST",
100-
body: JSON.stringify({ username }),
101-
headers: {
102-
Accept: "application/json",
103-
"Content-Type": "application/json",
104-
Authorization: `${process.env.HTTP_MAIN_COMMAND_SERVICE_ACCESS_TOKEN}`,
98+
await fetch(
99+
`${process.env.HTTP_SLAVE1_COMMAND_SERVICE_BASE_URL}/get-ranks`,
100+
{
101+
method: "POST",
102+
body: JSON.stringify({ username }),
103+
headers: {
104+
Accept: "application/json",
105+
"Content-Type": "application/json",
106+
Authorization: `${process.env.HTTP_SLAVE1_COMMAND_SERVICE_ACCESS_TOKEN}`,
107+
},
105108
},
106-
})
109+
)
107110
).json();
108111
if (response.success !== true) {
109112
throw new Error(response.error);

0 commit comments

Comments
 (0)