mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +01:00
fix(package/callback): fix broken js callbacks (#742)
This commit reverts commit 87818b3710.
This commit is contained in:
@@ -57,10 +57,9 @@ export function triggerServerCallback<T = unknown>(
|
||||
}
|
||||
|
||||
export function onServerCallback(eventName: string, cb: (...args: any[]) => any) {
|
||||
eventName = `__ox_cb_${eventName}`
|
||||
|
||||
exports.ox_lib.setValidCallback(eventName, true)
|
||||
onNet(eventName, async (resource: string, key: string, ...args: any[]) => {
|
||||
|
||||
onNet(`__ox_cb_${eventName}`, async (resource: string, key: string, ...args: any[]) => {
|
||||
let response: any;
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user