Skip to content

Commit

Permalink
- remove invite code screen from console
Browse files Browse the repository at this point in the history
- update devdoc documentation
  • Loading branch information
nxtCoder19 committed Jun 27, 2024
1 parent cb6bf3a commit 4371fc7
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 134 deletions.
4 changes: 0 additions & 4 deletions web/gql-queries-generator/doc/queries.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -1924,10 +1924,6 @@ mutation consoleDeleteAccountMembership($accountName: String!, $memberId: ID!) {
accounts_removeAccountMembership(accountName: $accountName, memberId: $memberId)
}

mutation consoleVerifyInviteCode($invitationCode: String!) {
auth_verifyInviteCode(invitationCode: $invitationCode)
}

query consoleGetCredToken($username: String!) {
cr_getCredToken(username: $username)
}
Expand Down
4 changes: 0 additions & 4 deletions web/lib/server/helpers/minimal-auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@ export const minimalAuth = async (ctx: IExtRemixCtx) => {
return redirect(`${authBaseUrl}/verify-email`);
}

if (whoAmI.data && !whoAmI.data.approved) {
return redirect(`${consoleBaseUrl}/invite-code`);
}

ctx.authProps = (props: MapType) => {
return {
...props,
Expand Down
2 changes: 1 addition & 1 deletion web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@jengaicons/react": "1.6.0",
"@mdx-js/react": "^2.3.0",
"@monaco-editor/react": "^4.6.0",
"@oshq/react-select": "^1.4.2",
"@oshq/react-select": "^1.4.4",
"@radix-ui/primitive": "^1.0.1",
"@radix-ui/react-alert-dialog": "1.0.4",
"@radix-ui/react-checkbox": "^1.0.4",
Expand Down
8 changes: 4 additions & 4 deletions web/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ const ExposedRoute = () => {
// error={!!portError}
// message={portError}
disableWhileLoading
createLabel="Exposed Domains"
/>
</div>
);
Expand Down Expand Up @@ -219,6 +220,7 @@ export const ExposedPorts = () => {
error={!!portError}
message={portError}
disableWhileLoading
createLabel="Exposed ports"
/>
</div>
</div>
Expand Down
8 changes: 1 addition & 7 deletions web/src/apps/console/routes/_main+/_index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
import { redirect } from '@remix-run/node';
import { GQLServerHandler } from '~/root/lib/server/gql/saved-queries';
import { IRemixCtx } from '~/root/lib/types/common';

export const loader = async (ctx: IRemixCtx) => {
const { data } = await GQLServerHandler(ctx.request).whoAmI();
if (data && !data.approved) {
return redirect(`/invite-code`);
}
export const loader = async () => {
return redirect('/teams');
};
91 changes: 0 additions & 91 deletions web/src/apps/console/routes/invite-code.tsx

This file was deleted.

15 changes: 0 additions & 15 deletions web/src/apps/console/server/gql/queries/access-queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ import {
ConsoleRejectInvitationMutationVariables,
ConsoleDeleteAccountMembershipMutation,
ConsoleDeleteAccountMembershipMutationVariables,
ConsoleVerifyInviteCodeMutation,
ConsoleVerifyInviteCodeMutationVariables,
} from '~/root/src/generated/gql/server';

export type IInvites = NN<
Expand Down Expand Up @@ -210,17 +208,4 @@ export const accessQueries = (executor: IExecutor) => ({
vars(_: ConsoleDeleteAccountMembershipMutationVariables) {},
}
),

verifyInviteCode: executor(
gql`
mutation Auth_verifyInviteCode($invitationCode: String!) {
auth_verifyInviteCode(invitationCode: $invitationCode)
}
`,
{
transformer: (data: ConsoleVerifyInviteCodeMutation) =>
data.auth_verifyInviteCode,
vars(_: ConsoleVerifyInviteCodeMutationVariables) {},
}
),
});
8 changes: 0 additions & 8 deletions web/src/generated/gql/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3633,14 +3633,6 @@ export type ConsoleDeleteAccountMembershipMutation = {
accounts_removeAccountMembership: boolean;
};

export type ConsoleVerifyInviteCodeMutationVariables = Exact<{
invitationCode: Scalars['String']['input'];
}>;

export type ConsoleVerifyInviteCodeMutation = {
auth_verifyInviteCode: boolean;
};

export type ConsoleGetCredTokenQueryVariables = Exact<{
username: Scalars['String']['input'];
}>;
Expand Down

0 comments on commit 4371fc7

Please sign in to comment.