Skip to content

Commit

Permalink
feat(global): new code
Browse files Browse the repository at this point in the history
  • Loading branch information
rimiti committed Sep 25, 2021
1 parent 6cd6df0 commit bcdfb4f
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/resources/signIn/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import * as en from './locales/en.json';

const i18n: II18n = { fr, en };

const authentication: IErrorRes = {
const signIn: IErrorRes = {
client: {
formInvalidEmail: {
status: EHttpCode.BAD_REQUEST,
Expand All @@ -26,4 +26,4 @@ const authentication: IErrorRes = {
i18n,
};

export default authentication;
export default signIn;
20 changes: 20 additions & 0 deletions src/resources/signUp/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { II18n, IErrorRes, EHttpCode } from '../../types';

// Locales
import * as fr from './locales/fr.json';
import * as en from './locales/en.json';

const i18n: II18n = { fr, en };

const signUp: IErrorRes = {
client: {
formEmailAlreadyExists: {
status: EHttpCode.BAD_REQUEST,
},
},
internal: {},
external: {},
i18n,
};

export default signUp;
7 changes: 7 additions & 0 deletions src/resources/signUp/locales/en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"client": {
"formEmailAlreadyExists": "Email already exist"
},
"internal": {},
"external": {}
}
7 changes: 7 additions & 0 deletions src/resources/signUp/locales/fr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"client": {
"formEmailAlreadyExists": "Un compte existe déjà avec cet email"
},
"internal": {},
"external": {}
}

0 comments on commit bcdfb4f

Please sign in to comment.