-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2091 from ever-co/feat/static-build-support-2
Feat/Next-Frontend APIs
- Loading branch information
Showing
15 changed files
with
349 additions
and
321 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,5 +19,5 @@ export async function GET(req: Request) { | |
access_token | ||
); | ||
|
||
return $res(response); | ||
return $res(response.data); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,5 +14,5 @@ export async function GET(req: Request) { | |
access_token | ||
); | ||
|
||
return $res(response); | ||
return $res(response.data); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.