diff --git a/src/resources/signIn/index.ts b/src/resources/signIn/index.ts index 15375a4..723fc09 100644 --- a/src/resources/signIn/index.ts +++ b/src/resources/signIn/index.ts @@ -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, @@ -26,4 +26,4 @@ const authentication: IErrorRes = { i18n, }; -export default authentication; +export default signIn; diff --git a/src/resources/signUp/index.ts b/src/resources/signUp/index.ts new file mode 100644 index 0000000..b8295b4 --- /dev/null +++ b/src/resources/signUp/index.ts @@ -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; diff --git a/src/resources/signUp/locales/en.json b/src/resources/signUp/locales/en.json new file mode 100644 index 0000000..cad15e5 --- /dev/null +++ b/src/resources/signUp/locales/en.json @@ -0,0 +1,7 @@ +{ + "client": { + "formEmailAlreadyExists": "Email already exist" + }, + "internal": {}, + "external": {} +} diff --git a/src/resources/signUp/locales/fr.json b/src/resources/signUp/locales/fr.json new file mode 100644 index 0000000..60f0975 --- /dev/null +++ b/src/resources/signUp/locales/fr.json @@ -0,0 +1,7 @@ +{ + "client": { + "formEmailAlreadyExists": "Un compte existe déjà avec cet email" + }, + "internal": {}, + "external": {} +}