updated living space add list updagte
This commit is contained in:
@@ -8,12 +8,13 @@ export async function GET(request: Request) {
|
||||
|
||||
const searchParams = new URL(request.url).searchParams;
|
||||
const uuid = searchParams.get('uuid');
|
||||
console.dir({ uuid }, { depth: null });
|
||||
const buildID = searchParams.get('buildID');
|
||||
console.dir({ uuid, buildID }, { depth: null });
|
||||
if (!uuid) { return NextResponse.json({ error: 'UUID not found in search params' }, { status: 400 }) }
|
||||
try {
|
||||
const client = new GraphQLClient(endpoint);
|
||||
const query = gql`mutation DeleteCompany($uuid: String!) { deleteCompany(uuid: $uuid) }`;
|
||||
const data = await client.request(query, { uuid });
|
||||
const query = gql`mutation DeleteCompany($buildID: String!, $uuid: String!) { deleteCompany(buildID: $buildID, uuid: $uuid) }`;
|
||||
const data = await client.request(query, { buildID, uuid });
|
||||
return NextResponse.json({ data: data.deleteUserType, status: 200 });
|
||||
} catch (err: any) {
|
||||
console.error(err);
|
||||
|
||||
Reference in New Issue
Block a user