Skip to content

Commit 6b97d9c

Browse files
committed
fix nits
1 parent 0c10bda commit 6b97d9c

3 files changed

Lines changed: 20 additions & 19 deletions

File tree

apps/webapp/app/presenters/v3/BranchesPresenter.server.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { checkBranchLimit } from "~/services/upsertBranch.server";
1111
import { devPresence } from "./DevPresence.server";
1212
import { sortEnvironments } from "~/utils/environmentSort";
1313
import {
14+
BranchableEnvironmentToken,
1415
type BranchableEnvironmentType,
1516
toBranchableEnvironmentType,
1617
} from "~/utils/branchableEnvironment";
@@ -103,7 +104,7 @@ export class BranchesPresenter {
103104
}: {
104105
userId: User["id"];
105106
projectSlug: Project["slug"];
106-
env: "preview" | "development";
107+
env: BranchableEnvironmentToken;
107108
} & Options) {
108109
const project = await this.#prismaClient.project.findFirst({
109110
select: {

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

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -318,26 +318,26 @@ function getApiKeyResult(apiKey: string): {
318318
const type = isPublicApiKey(apiKey)
319319
? "PUBLIC"
320320
: isSecretApiKey(apiKey)
321-
? "PRIVATE"
322-
: isPublicJWT(apiKey)
323-
? "PUBLIC_JWT"
324-
: "PRIVATE"; // Fallback to private key
321+
? "PRIVATE"
322+
: isPublicJWT(apiKey)
323+
? "PUBLIC_JWT"
324+
: "PRIVATE"; // Fallback to private key
325325
return { apiKey, type };
326326
}
327327

328328
export type AuthenticationResult =
329329
| {
330-
type: "personalAccessToken";
331-
result: PersonalAccessTokenAuthenticationResult;
332-
}
330+
type: "personalAccessToken";
331+
result: PersonalAccessTokenAuthenticationResult;
332+
}
333333
| {
334-
type: "organizationAccessToken";
335-
result: OrganizationAccessTokenAuthenticationResult;
336-
}
334+
type: "organizationAccessToken";
335+
result: OrganizationAccessTokenAuthenticationResult;
336+
}
337337
| {
338-
type: "apiKey";
339-
result: ApiAuthenticationResult;
340-
};
338+
type: "apiKey";
339+
result: ApiAuthenticationResult;
340+
};
341341

342342
type AuthenticationMethod = "personalAccessToken" | "organizationAccessToken" | "apiKey";
343343

@@ -354,11 +354,11 @@ type FilteredAuthenticationResult<
354354
T extends AllowedAuthenticationMethods = AllowedAuthenticationMethods
355355
> =
356356
| (T["personalAccessToken"] extends true
357-
? Extract<AuthenticationResult, { type: "personalAccessToken" }>
358-
: never)
357+
? Extract<AuthenticationResult, { type: "personalAccessToken" }>
358+
: never)
359359
| (T["organizationAccessToken"] extends true
360-
? Extract<AuthenticationResult, { type: "organizationAccessToken" }>
361-
: never)
360+
? Extract<AuthenticationResult, { type: "organizationAccessToken" }>
361+
: never)
362362
| (T["apiKey"] extends true ? Extract<AuthenticationResult, { type: "apiKey" }> : never);
363363

364364
/**

apps/webapp/app/utils/branchableEnvironment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export type BranchableEnvironmentType = Extract<
1313

1414
/**
1515
* The wire/form token for a branchable environment kind, as sent by the CLI and
16-
* dashboard forms (`"preview" | "development"`).
16+
* dashboard forms.
1717
*/
1818
export type BranchableEnvironmentToken = "preview" | "development";
1919

0 commit comments

Comments
 (0)