Skip to content

Commit

Permalink
Codacy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
JessicaMulein committed Sep 20, 2024
1 parent c2f61e1 commit 7169a2a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { NextFunction, Request, Response } from "express";
import { IncomingHttpHeaders } from "http";
import { AccountStatusTypeEnum, IRoleDocument, RoleModel, UserModel, ITokenUser } from "@duality-social/duality-social-lib";
import { JwtService } from "../services/jwt.ts";
import { UserService } from "../services/user.ts";
import { RequestUserService } from "../services/request-user.ts";

export function findAuthToken(headers: IncomingHttpHeaders): string | null {
Expand Down
3 changes: 1 addition & 2 deletions apps/duality-social-node/src/services/user.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { MailDataRequired, MailService } from '@sendgrid/mail';
import { environment } from '../environment';
import { AccountDeletedError, AccountLockedError, AccountStatusError, AccountStatusTypeEnum, AppConstants, EmailInUseError, EmailTokenExpiredError, EmailTokenModel, EmailTokenSentTooRecentlyError, EmailTokenType, EmailTokenUsedOrInvalidError, EmailVerifiedError, IEmailTokenDocument, InvalidCredentialsError, InvalidPasswordError, InvalidTokenError, InvalidUsernameError, IRequestUser, IRoleDocument, IUser, IUserDocument, ICreateUserBasics, LockTypeEnum, PendingEmailVerificationError, UserModel, UsernameInUseError, UsernameOrEmailRequiredError, UserNotFoundError, ProfileModel, IProfile, IApiUserProfileResponse } from '@duality-social/duality-social-lib';
import { AccountDeletedError, AccountLockedError, AccountStatusError, AccountStatusTypeEnum, AppConstants, EmailInUseError, EmailTokenExpiredError, EmailTokenModel, EmailTokenSentTooRecentlyError, EmailTokenType, EmailTokenUsedOrInvalidError, EmailVerifiedError, IEmailTokenDocument, InvalidCredentialsError, InvalidPasswordError, InvalidTokenError, InvalidUsernameError, IUser, IUserDocument, ICreateUserBasics, LockTypeEnum, PendingEmailVerificationError, UserModel, UsernameInUseError, UsernameOrEmailRequiredError, UserNotFoundError, ProfileModel, IProfile, IApiUserProfileResponse } from '@duality-social/duality-social-lib';
import { compare, hashSync } from 'bcrypt';
import { randomBytes } from 'crypto';
import { MongooseValidationError } from '../errors/mongoose-validation-error.ts';
import { RequestUserService } from './request-user.ts';

export class UserService {
private sendgridClient: MailService;
Expand Down
7 changes: 2 additions & 5 deletions apps/duality-social-react/src/components/dashboard-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ import {
Container,
Paper,
Typography,
List,
ListItem,
ListItemText,
Divider,
CircularProgress,
useTheme,
} from '@mui/material';
Expand Down Expand Up @@ -36,8 +32,9 @@ const DashboardPage: React.FC = () => {
justifyContent="center"
alignItems="center"
height="100vh"
bgcolor={theme.palette.background.default}
>
<CircularProgress />
<CircularProgress color="primary" />
</Box>
);
}
Expand Down
2 changes: 1 addition & 1 deletion apps/duality-social-react/src/components/private-route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const PrivateRoute: React.FC<PrivateRouteProps> = ({ children }) => {
return <Navigate to="/login" state={{ from: location }} replace />;
}

return <>{children}</>;
return children;
};

export default PrivateRoute;

0 comments on commit 7169a2a

Please sign in to comment.