From 49672d35737e2ba9412679928ce903fcfe643526 Mon Sep 17 00:00:00 2001 From: Tim Haasdyk Date: Mon, 25 Nov 2024 13:14:49 +0100 Subject: [PATCH] Fix approving/opening draft project --- .../routes/(authenticated)/project/create/+page.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/src/routes/(authenticated)/project/create/+page.ts b/frontend/src/routes/(authenticated)/project/create/+page.ts index 6d04d4f5d..2733219c0 100644 --- a/frontend/src/routes/(authenticated)/project/create/+page.ts +++ b/frontend/src/routes/(authenticated)/project/create/+page.ts @@ -1,9 +1,9 @@ -import type { $OpResult, AskToJoinProjectMutation, CreateProjectInput, CreateProjectMutation, ProjectsByLangCodeAndOrgQuery, ProjectsByNameAndOrgQuery } from '$lib/gql/types'; -import { getClient, graphql } from '$lib/gql'; +import type {$OpResult, AskToJoinProjectMutation, CreateProjectInput, CreateProjectMutation, ProjectsByLangCodeAndOrgQuery, ProjectsByNameAndOrgQuery} from '$lib/gql/types'; +import {getClient, graphql} from '$lib/gql'; -import type { PageLoadEvent } from './$types'; -import { getSearchParam } from '$lib/util/query-params'; -import { isGuid } from '$lib/util/guid'; +import type {PageLoadEvent} from './$types'; +import {getSearchParam} from '$lib/util/query-params'; +import {isGuid} from '$lib/util/guid'; export async function load(event: PageLoadEvent) { const userIsAdmin = (await event.parent()).user.isAdmin; @@ -14,7 +14,7 @@ export async function load(event: PageLoadEvent) { const userResultsPromise = await client.query(graphql(` query loadRequestingUser($userId: UUID!) { users( - where: {id: {eq: $userId}}) { + where: {id: {eq: $userId}}, take: 1) { items { id name