Skip to content

Commit

Permalink
fix(builtins): circularity issue
Browse files Browse the repository at this point in the history
  • Loading branch information
minenwerfer committed Dec 10, 2024
1 parent ab911df commit 1522c0c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/builtins/src/collections/user/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { AccessCondition, Collection } from '@aeriajs/types'
import type { AccessCondition, Collection, Context } from '@aeriajs/types'
import { defineCollection, get, getAll, remove, upload, removeFile } from '@aeriajs/core'
import { description } from './description.js'
import { authenticate } from './authenticate.js'
Expand Down Expand Up @@ -41,7 +41,12 @@ const exposedFunctions: Record<keyof typeof functions, AccessCondition> = {

export const user = defineCollection({
description,
functions,
functions: functions as {
[P in keyof typeof functions]: (
payload: Parameters<typeof functions[P]>[0],
context: Omit<Context, 'token'>
) => ReturnType<typeof functions[P]>
},
})

Object.assign(user, {
Expand Down

0 comments on commit 1522c0c

Please sign in to comment.