Skip to content

Commit 9d636ea

Browse files
authored
Merge pull request #6059 from bcgov/fix/6058
fix(6058): add hardcoded LP and cluster for local getQuotaChangeStatus
2 parents 3673400 + 894e3a4 commit 9d636ea

File tree

1 file changed

+4
-2
lines changed
  • app/app/api/private-cloud/products/[licencePlate]/quota-change-status

1 file changed

+4
-2
lines changed

app/app/api/private-cloud/products/[licencePlate]/quota-change-status/route.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { z } from 'zod';
2+
import { IS_PROD, IS_TEST } from '@/config';
23
import { GlobalRole } from '@/constants';
34
import createApiHandler from '@/core/api-handler';
45
import { OkResponse, UnauthorizedResponse } from '@/core/responses';
@@ -22,6 +23,7 @@ const apiHandler = createApiHandler({
2223
export const POST = apiHandler(async ({ session, pathParams, body }) => {
2324
const { licencePlate } = pathParams;
2425
const { resourceRequests } = body;
26+
const isLocal = !(IS_PROD || IS_TEST);
2527

2628
const { data: currentProduct } = await models.privateCloudProduct.get(
2729
{
@@ -39,8 +41,8 @@ export const POST = apiHandler(async ({ session, pathParams, body }) => {
3941
}
4042

4143
const quotaChangeStatus = await getQuotaChangeStatus({
42-
licencePlate,
43-
cluster: currentProduct.cluster,
44+
licencePlate: isLocal ? 'e3913e' : licencePlate,
45+
cluster: isLocal ? 'KLAB' : currentProduct.cluster,
4446
currentResourceRequests: currentProduct.resourceRequests,
4547
requestedResourceRequests: resourceRequests,
4648
});

0 commit comments

Comments
 (0)