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
This commit is contained in:
@@ -153,6 +153,10 @@ export async function authenticatedEnvironmentForAuthentication(
|
||||
projectRef: string,
|
||||
slug: string
|
||||
): Promise<AuthenticatedEnvironment> {
|
||||
if (slug === "staging") {
|
||||
slug = "stg";
|
||||
}
|
||||
|
||||
switch (auth.type) {
|
||||
case "apiKey": {
|
||||
if (auth.result.environment.project.externalRef !== projectRef) {
|
||||
|
||||
Reference in New Issue
Block a user