Skip to content

Commit

Permalink
fix(server/accounts): type fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
thelindat committed Feb 25, 2024
1 parent 62f471f commit b7dcb7b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion server/accounts/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export async function WithdrawMoney(playerId: number, accountId: number, amount:
return true;
}

export function UpdateAccountAccess(accountId: string, id: number, role?: string) {
export function UpdateAccountAccess(accountId: number, id: number, role?: string) {
if (!role) return db.update(`DELETE FROM accounts_access WHERE accountId = ? AND charId = ?`, [accountId, id]);

return db.update(
Expand Down
4 changes: 2 additions & 2 deletions server/accounts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ export async function GetAccountRole(accountId: number, id: number | string) {
return charId && SelectAccountRole(accountId, charId) || null;
}

export async function SetAccountAccess(accountId: string, id: number | string, role: string) {
export async function SetAccountAccess(accountId: number, id: number | string, role: string) {
const charId = typeof id === 'string' ? await GetCharIdFromStateId(id) : id;
return charId && UpdateAccountAccess(accountId, charId, role);
}

export async function RemoveAccountAccess(accountId: string, id: number | string) {
export async function RemoveAccountAccess(accountId: number, id: number | string) {
const charId = typeof id === 'string' ? await GetCharIdFromStateId(id) : id;
return charId && UpdateAccountAccess(accountId, charId);
}
Expand Down

0 comments on commit b7dcb7b

Please sign in to comment.