mirror of
https://github.com/wasp-lang/wasp.git
synced 2024-11-28 12:16:11 +03:00
9 lines
246 B
JavaScript
9 lines
246 B
JavaScript
import HttpError from '@wasp/core/HttpError.js'
|
|
|
|
export const getTasks = async (args, context) => {
|
|
if (!context.user) { throw new HttpError(403) }
|
|
return context.entities.Task.findMany(
|
|
{ where: { user: { id: context.user.id } } }
|
|
)
|
|
}
|