Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release #2092

Merged
merged 5 commits into from
Jan 15, 2024
Merged

Release #2092

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/web/app/api/integration-tenant/[id]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ export async function DELETE(req: Request, { params }: { params: { id: string }
if (id) {
const response = await deleteIntegrationTenantRequest(id as string, tenantId, organizationId, access_token);

return $res(response);
return $res(response.data);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ export async function GET(req: Request) {
access_token
);

return $res(response);
return $res(response.data);
}
22 changes: 22 additions & 0 deletions apps/web/app/api/integration/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { authenticatedGuard } from '@app/services/server/guards/authenticated-guard-app';
import { getIntegrationRequest } from '@app/services/server/requests/integrations';
import { NextResponse } from 'next/server';

export async function GET(req: Request) {
const res = new NextResponse();
const { $res, user, access_token, tenantId } = await authenticatedGuard(req, res);
if (!user) return NextResponse.json({}, { status: 401 });

const { searchParams } = new URL(req.url);

const response = await getIntegrationRequest(
{
tenantId: tenantId,
integrationTypeId: searchParams.get('integrationTypeId') as string,
searchQuery: searchParams.get('searchQuery') as string
},
access_token
);

return $res(response.data);
}
2 changes: 1 addition & 1 deletion apps/web/app/api/integration/types/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ export async function GET(req: Request) {
access_token
);

return $res(response);
return $res(response.data);
}
6 changes: 5 additions & 1 deletion apps/web/app/api/organization-team-join/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@ export async function GET(req: Request) {
tenantId,
organizationId
});

return NextResponse.json(requestToJoinData.data);
}

export async function POST(req: Request) {
const body = (await req.json()) as IRequestToJoinCreate;
return NextResponse.json(await requestToJoinRequest(body));

const response = await requestToJoinRequest(body);

return NextResponse.json(response.data);
}
Loading
Loading