Skip to content

Commit

Permalink
fix(server/player): await promise in hasAccountPermission
Browse files Browse the repository at this point in the history
Technically works anyway (returns and awaits the promise)
but fixed for sanity/correctness.
  • Loading branch information
thelindat committed Jul 27, 2024
1 parent fa36834 commit 6c0d5df
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/player/class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ export class OxPlayer extends ClassInterface {

async hasAccountPermission(accountId: number, action: keyof OxAccountPermissions) {
return (
this.charId && CanPerformAction(this, accountId, (await GetAccountRole(accountId, this.charId)) || null, action)
this.charId &&
(await CanPerformAction(this, accountId, (await GetAccountRole(accountId, this.charId)) || null, action))
);
}

Expand Down

0 comments on commit 6c0d5df

Please sign in to comment.