Skip to content

Commit

Permalink
fix(logger): check player ace when fetching resource data
Browse files Browse the repository at this point in the history
  • Loading branch information
thelindat committed Jul 11, 2023
1 parent 1510489 commit ade2b38
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/logger/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,10 @@ const sortQueries = (queries: QueryData[], sort: { id: 'query' | 'executionTime'
onNet(
`oxmysql:fetchResource`,
(data: { resource: string; pageIndex: number; sortBy?: { id: 'query' | 'executionTime'; desc: boolean }[] }) => {
if (typeof data.resource !== 'string') return;
const resourceLog = logStorage[data.resource];
if (typeof data.resource !== 'string' || !IsPlayerAceAllowed(source as unknown as string, 'command.mysql')) return;

const resourceLog = logStorage[data.resource];
const sort = data.sortBy && data.sortBy.length > 0 ? data.sortBy[0] : false;

const startRow = data.pageIndex * 10;
const endRow = startRow + 10;
const queries = sort
Expand Down

0 comments on commit ade2b38

Please sign in to comment.