Fix JSON parsing exception caused by double-encoding metrics data (!422)
Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com> Reviewed-on: https://dev.sp-tarkov.com/SPT/Server/pulls/422 Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com> Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
This commit is contained in:
parent
8b218cdb8f
commit
aed26ffcd3
@ -1,5 +1,6 @@
|
||||
import { MatchController } from "@spt/controllers/MatchController";
|
||||
import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData";
|
||||
import { IMetrics } from "@spt/models/eft/common/tables/IMatch";
|
||||
import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData";
|
||||
import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData";
|
||||
import { IEndLocalRaidRequestData } from "@spt/models/eft/match/IEndLocalRaidRequestData";
|
||||
@ -137,8 +138,8 @@ export class MatchCallbacks {
|
||||
}
|
||||
|
||||
/** Handle client/getMetricsConfig */
|
||||
public getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData<string> {
|
||||
return this.httpResponse.getBody(this.jsonUtil.serialize(this.databaseService.getMatch().metrics));
|
||||
public getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData<IMetrics> {
|
||||
return this.httpResponse.getBody(this.databaseService.getMatch().metrics);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user