mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-16 22:46:03 +01:00
fix(package/callback): format setValidCallback event name
This commit is contained in:
@@ -55,9 +55,10 @@ export function triggerServerCallback<T = unknown>(
|
||||
}
|
||||
|
||||
export function onServerCallback(eventName: string, cb: (...args: any[]) => any) {
|
||||
exports.ox_lib.setValidCallback(eventName, true)
|
||||
eventName = `__ox_cb_${eventName}`
|
||||
|
||||
onNet(`__ox_cb_${eventName}`, async (resource: string, key: string, ...args: any[]) => {
|
||||
exports.ox_lib.setValidCallback(eventName, true)
|
||||
onNet(eventName, async (resource: string, key: string, ...args: any[]) => {
|
||||
let response: any;
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user