mirror of
https://github.com/rilaxik/fivem-rpc.git
synced 2026-09-28 01:29:13 +00:00
fix(rpc): remove dead RPCStateRaw branch
This commit is contained in:
@@ -6,7 +6,6 @@ import {
|
|||||||
RPCEvents,
|
RPCEvents,
|
||||||
type RPCConfig,
|
type RPCConfig,
|
||||||
type RPCState,
|
type RPCState,
|
||||||
type RPCStateRaw,
|
|
||||||
type RPCStateWeb,
|
type RPCStateWeb,
|
||||||
} from '../utils/types'
|
} from '../utils/types'
|
||||||
import type {
|
import type {
|
||||||
@@ -157,16 +156,13 @@ export class RPCInstanceWebview extends RPCInstanceBase {
|
|||||||
return response
|
return response
|
||||||
}
|
}
|
||||||
|
|
||||||
private async _createHttpClientRequest<R>(
|
private async _createHttpClientRequest<R>(data: RPCState): Promise<R> {
|
||||||
data: RPCStateRaw | RPCState,
|
|
||||||
): Promise<R> {
|
|
||||||
const dataRaw = typeof data === 'string' ? data : stringify(data)
|
|
||||||
const options = {
|
const options = {
|
||||||
method: 'post',
|
method: 'post',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json; charset=UTF-8',
|
'Content-Type': 'application/json; charset=UTF-8',
|
||||||
},
|
},
|
||||||
body: dataRaw,
|
body: stringify(data),
|
||||||
}
|
}
|
||||||
const resourceName = window?.GetParentResourceName?.() ?? 'nui-frame-app'
|
const resourceName = window?.GetParentResourceName?.() ?? 'nui-frame-app'
|
||||||
return fetch(
|
return fetch(
|
||||||
|
|||||||
Reference in New Issue
Block a user