Skip to content

Commit

Permalink
修复 SGP 获取对局接口 uri 拼接错误问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Hanxven committed Sep 25, 2024
1 parent e4f9a72 commit 9064c7f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "league-akari",
"version": "1.2.6-fix.1",
"version": "1.2.6-fix.2",
"author": {
"name": "Hanxven",
"email": "[email protected]"
Expand Down
1 change: 0 additions & 1 deletion src/renderer-shared/modules/auto-gameflow/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { LeagueAkariRendererModuleManager } from '@renderer-shared/akari-ipc/renderer-module-manager'
import { StateSyncModule } from '@renderer-shared/akari-ipc/state-sync-module'

import { useAutoGameflowStore } from './store'
Expand Down
18 changes: 11 additions & 7 deletions src/shared/data-sources/sgp/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,29 +128,33 @@ export class SgpApi {
)
}

getGameSummary(platformId: string, gameId: number) {
getGameSummary(sgpServerId: string, gameId: number) {
if (!this._jwtToken) {
throw new Error('jwt token is not set')
}

const sgpServer = this._getSgpServer(platformId)
const sgpServer = this._getSgpServer(sgpServerId)

const subId = this._getSubId(sgpServerId)

return this._http.get<SgpGameSummaryLol>(
`/match-history-query/v1/products/lol/${platformId.toUpperCase()}_${gameId}/SUMMARY`,
`/match-history-query/v1/products/lol/${subId.toUpperCase()}_${gameId}/SUMMARY`,
{ baseURL: sgpServer.server }
)
}

getGameDetails(platformId: string, gameId: number) {
getGameDetails(sgpServerId: string, gameId: number) {
if (!this._jwtToken) {
throw new Error('jwt token is not set')
}

const platformSgpServer = this._getSgpServer(platformId)
const sgpServer = this._getSgpServer(sgpServerId)

const subId = this._getSubId(sgpServerId)

return this._http.get<SgpGameDetailsLol>(
`/match-history-query/v1/products/lol/${platformId.toUpperCase()}_${gameId}/DETAILS`,
{ baseURL: platformSgpServer.server }
`/match-history-query/v1/products/lol/${subId.toUpperCase()}_${gameId}/DETAILS`,
{ baseURL: sgpServer.server }
)
}

Expand Down

0 comments on commit 9064c7f

Please sign in to comment.