Skip to content

Commit

Permalink
fix tsc
Browse files Browse the repository at this point in the history
  • Loading branch information
HexaField committed Nov 25, 2023
1 parent 2cbad9a commit 5a25e7c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/bot/utils/make-user-admin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ Ethereal Engine. All Rights Reserved.
import knex from 'knex'
import { v4 } from 'uuid'
/* eslint-disable @typescript-eslint/no-var-requires */
import { ScopeID, ScopeType, scopePath } from '@etherealengine/engine/src/schemas/scope/scope.schema'
import { ScopeID, ScopeTypeInterface, scopePath } from '@etherealengine/engine/src/schemas/scope/scope.schema'
import { UserType, userPath } from '@etherealengine/engine/src/schemas/user/user.schema'

const dotenv = require('dotenv-flow');
const dotenv = require('dotenv-flow')
import appRootPath from 'app-root-path'
const { scopeTypeSeed } = require('@etherealengine/server-core/src/scope/scope-type/scope-type.seed')

dotenv.config({
path: appRootPath.path,
silent: true
path: appRootPath.path,
silent: true
})

export const makeAdmin = async (userId) => {
Expand Down Expand Up @@ -63,14 +63,14 @@ export const makeAdmin = async (userId) => {
for (const { type } of scopeTypeSeed) {
try {
const existingScope = await knexClient
.from<ScopeType>(scopePath)
.from<ScopeTypeInterface>(scopePath)
.where({
userId: userId,
type
})
.first()
if (existingScope == null) {
await knexClient.from<ScopeType>(scopePath).insert({
await knexClient.from<ScopeTypeInterface>(scopePath).insert({
id: v4() as ScopeID,
userId: userId,
type,
Expand All @@ -91,4 +91,4 @@ export const makeAdmin = async (userId) => {
} catch (err) {
console.error(err)
}
};
}

0 comments on commit 5a25e7c

Please sign in to comment.