Skip to content

Commit

Permalink
fix(server/groups): type corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
thelindat committed May 29, 2024
1 parent 529fd26 commit e056b1f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions server/groups/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { addAce, addCommand, addPrincipal, locale, removeAce, removePrincipal } from '@overextended/ox_lib/server';
import { addAce, addCommand, addPrincipal, removeAce, removePrincipal } from '@overextended/ox_lib/server';
import { SelectGroups } from './db';
import { OxPlayer } from 'player/class';
import type { Dict, OxGroup } from 'types';
import type { GroupsResult } from './db';
import type { Dict, OxGroup, DbGroups } from 'types';
import { GetGroupPermissions } from '../../common';

const groups: Dict<OxGroup> = {};
Expand All @@ -29,10 +28,10 @@ export function RemoveGroupPermission(groupName: string, grade: number, permissi
GlobalState[`group.${groupName}:permissions`] = permissions;
}

async function CreateGroup(data: GroupsResult) {
async function CreateGroup(data: DbGroups) {
const group: OxGroup = {
...data,
grades: JSON.parse(data.grades),
grades: JSON.parse(data.grades as any),
principal: `group.${data.name}`,
};

Expand Down

0 comments on commit e056b1f

Please sign in to comment.