Skip to content

Commit ec8381e

Browse files
committed
Fix for staging environment variable API endpoints
Ugly but effective fix for the fact we can pass the slug in as “staging” when we use “stg” internally
1 parent 76a15fd commit ec8381e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

apps/webapp/app/services/apiAuth.server.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,10 @@ export async function authenticatedEnvironmentForAuthentication(
153153
projectRef: string,
154154
slug: string
155155
): Promise<AuthenticatedEnvironment> {
156+
if (slug === "staging") {
157+
slug = "stg";
158+
}
159+
156160
switch (auth.type) {
157161
case "apiKey": {
158162
if (auth.result.environment.project.externalRef !== projectRef) {

0 commit comments

Comments
 (0)