From e056b1f16d580340d6f85ed2b43c03354e46e911 Mon Sep 17 00:00:00 2001 From: Linden <65407488+thelindat@users.noreply.github.com> Date: Wed, 29 May 2024 21:47:10 +1000 Subject: [PATCH] fix(server/groups): type corrections --- server/groups/index.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/server/groups/index.ts b/server/groups/index.ts index dd4181a..8565ecf 100644 --- a/server/groups/index.ts +++ b/server/groups/index.ts @@ -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 = {}; @@ -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}`, };