mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-04 06:28:53 +00:00
fix(logger): check player ace when fetching resource data
This commit is contained in:
1 parent
1510489b63
commit
ade2b38bbf
1 file changed
+2
-3
+2
-3
@@ -94,11 +94,10 @@ const sortQueries = (queries: QueryData[], sort: { id: 'query' | 'executionTime'
|
|||||||
onNet(
|
onNet(
|
||||||
`oxmysql:fetchResource`,
|
`oxmysql:fetchResource`,
|
||||||
(data: { resource: string; pageIndex: number; sortBy?: { id: 'query' | 'executionTime'; desc: boolean }[] }) => {
|
(data: { resource: string; pageIndex: number; sortBy?: { id: 'query' | 'executionTime'; desc: boolean }[] }) => {
|
||||||
if (typeof data.resource !== 'string') return;
|
if (typeof data.resource !== 'string' || !IsPlayerAceAllowed(source as unknown as string, 'command.mysql')) return;
|
||||||
|
|
||||||
const resourceLog = logStorage[data.resource];
|
const resourceLog = logStorage[data.resource];
|
||||||
|
|
||||||
const sort = data.sortBy && data.sortBy.length > 0 ? data.sortBy[0] : false;
|
const sort = data.sortBy && data.sortBy.length > 0 ? data.sortBy[0] : false;
|
||||||
|
|
||||||
const startRow = data.pageIndex * 10;
|
const startRow = data.pageIndex * 10;
|
||||||
const endRow = startRow + 10;
|
const endRow = startRow + 10;
|
||||||
const queries = sort
|
const queries = sort
|
||||||
|
|||||||
Reference in new issue
Block a user