fix(website): Wait for edge config to return deployed_sha (#7143)

#7136 introduced a bug where the portal's deployed_sha is now blank
because we don't `await` its response.
This commit is contained in:
Jamil
2024-10-23 10:10:00 -07:00
committed by GitHub
parent 2ca91a3b1a
commit ac2c5af45a

View File

@@ -8,12 +8,8 @@ export const dynamic = "force-static";
export const revalidate = 60;
export async function GET(_req: NextRequest) {
return NextResponse.json(versions());
}
function versions() {
return {
portal: get("deployed_sha"),
const versions = {
portal: await get("deployed_sha"),
// mark:current-apple-version
apple: "1.3.6",
// mark:current-android-version
@@ -25,4 +21,6 @@ function versions() {
// mark:current-gateway-version
gateway: "1.3.2",
};
return NextResponse.json(versions);
}