diff --git a/frontend/src/lib/gql/mutations.ts b/frontend/src/lib/gql/mutations.ts index f1e7a32e96..97499bd420 100644 --- a/frontend/src/lib/gql/mutations.ts +++ b/frontend/src/lib/gql/mutations.ts @@ -1,66 +1,8 @@ -import type { $OpResult, DeleteUserByAdminOrSelfInput, DeleteUserByAdminOrSelfMutation, SoftDeleteProjectMutation, DeleteDraftProjectMutation, AcquireProjectMutation, ReleaseProjectMutation } from './types'; +import type { $OpResult, DeleteUserByAdminOrSelfInput, DeleteUserByAdminOrSelfMutation, SoftDeleteProjectMutation, DeleteDraftProjectMutation } from './types'; import { getClient } from './gql-client'; import { graphql } from './generated'; -export async function _acquireProject(orgId: string, projectId: string): $OpResult { - //language=GraphQL - const result = await getClient() - .mutation( - graphql(` - mutation AcquireProject($input: AcquireProjectInput!) { - acquireProject(input: $input) { - organization { - id - projects { - id - name - code - } - } - errors { - ... on Error { - __typename - message - } - } - } - } - `), - { input: { orgId, projectId } }, - ); - return result; -} - -export async function _releaseProject(orgId: string, projectId: string): $OpResult { - //language=GraphQL - const result = await getClient() - .mutation( - graphql(` - mutation ReleaseProject($input: ReleaseProjectInput!) { - releaseProject(input: $input) { - organization { - id - projects { - id - name - code - } - } - errors { - ... on Error { - __typename - message - } - } - } - } - `), - { input: { orgId, projectId } }, - ); - return result; -} - export async function _deleteUserByAdminOrSelf(input: DeleteUserByAdminOrSelfInput): $OpResult { //language=GraphQL const result = await getClient() diff --git a/frontend/src/routes/(unauthenticated)/sandbox/+page.svelte b/frontend/src/routes/(unauthenticated)/sandbox/+page.svelte index a02e0d8829..eb3f9d4fcd 100644 --- a/frontend/src/routes/(unauthenticated)/sandbox/+page.svelte +++ b/frontend/src/routes/(unauthenticated)/sandbox/+page.svelte @@ -11,7 +11,6 @@ import ConfirmModal from '$lib/components/modals/ConfirmModal.svelte'; import {delay} from '$lib/util/time'; import DeleteModal from '$lib/components/modals/DeleteModal.svelte'; - import { _acquireProject, _releaseProject } from '$lib/gql/mutations'; function uploadFinished(): void { alert('upload done!'); @@ -48,17 +47,6 @@ function preFillForm(): void { let modal: ConfirmModal; let deleteModal: DeleteModal; -const testOrgId = '292c80e6-a815-4cd1-9ea2-34bd01274de6'; -const sena3Id = '0ebc5976-058d-4447-aaa7-297f8569f968'; - -async function acquire() { - console.log(await _acquireProject(testOrgId, sena3Id)); -} - -async function release() { - console.log(await _releaseProject(testOrgId, sena3Id)); -} - Hello from sandbox second value @@ -82,12 +70,6 @@ async function release() { -
-
- - -
-