Skip to content

Commit

Permalink
chor: code refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
yosvelquintero committed Sep 25, 2023
1 parent 48e6e32 commit 36c3c2a
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 33 deletions.
10 changes: 0 additions & 10 deletions packages/core/config/src/lib/constants/regex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,4 @@ export const REGEX: Readonly<IRegexConstant> = {
name: /^(?!.*([a-zA-ZäöüÄÖÜß0-9@_.-])\1)(?!.*([a-zA-ZäöüÄÖÜß0-9@_.-])\2)[a-zA-ZäöüÄÖÜß][a-zA-Z0-9äöüÄÖÜß@_.-]{7,19}[a-zA-Z0-9äöüÄÖÜß@_.-]$/,
password:
/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[$@$!%*?&])[A-Za-zd$@$!%*?&].{6,20}$/,
http: {
response: {
error: {
unknown:
/^Http failure response for (https?:\/\/[^\s]+): \d+ Unknown Error$/,
unauthorized:
/^Http failure response for (https?:\/\/[^\s]+): \d+ Unauthorized$/,
},
},
},
};
9 changes: 2 additions & 7 deletions packages/core/state/src/lib/+state/app/app.reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ import * as dayjs from 'dayjs';
import { STORE } from '@console-core/config';
import { EActionStatus, IAppState, INotification } from '@console-core/types';

import {
capitalizeFirstLetter,
handleHttpResponseErrorContent,
} from '../../utils';
import { capitalizeFirstLetter } from '../../utils';

import * as appActions from './app.actions';

Expand All @@ -24,9 +21,7 @@ const reducer = createReducer<IAppState>(
const notification: INotification = {
...payload,
title: capitalizeFirstLetter(payload.type),
content: capitalizeFirstLetter(
handleHttpResponseErrorContent(payload.content)
),
content: capitalizeFirstLetter(payload.content),
date: dayjs().toDate(),
};

Expand Down
15 changes: 0 additions & 15 deletions packages/core/state/src/lib/utils/http-response.ts

This file was deleted.

2 changes: 1 addition & 1 deletion packages/core/state/src/lib/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * from './capitalize-first-letter';
export * from './rxjs-filters';
export * from './http-response';
export * from './operation-status';
export * from './state';
export * from './user';

0 comments on commit 36c3c2a

Please sign in to comment.