kritsana135-hooray-server
Version:
for server
136 lines (135 loc) • 4.04 kB
JavaScript
export const CAN_NOT_SAVE_TO_DB = {
message: {
en: 'Can not save to database',
th: 'เกิดข้อผิดพลาด ไม่สามารถบันทึกข้อมูลลงฐานข้อมูลได้',
},
code: 'CAN_NOT_SAVE_TO_DB',
};
export const PASSWORD_NOT_MATCH = {
message: {
en: "Passwords didn't match!",
th: 'รหัสผ่านไม่ตรงกัน',
},
code: 'PASSWORD_NOT_MATCH',
};
export const NEW_PASSWORD_CANNOT_SAME_CURRENT_PASSWORD = {
message: {
en: 'Your new password can not be the same as your current password',
th: 'รหัสผ่านใหม่ไม่สามารถเหมือนรหัสผ่านปัจจุบันได้',
},
code: 'NEW_PASSWORD_CANNOT_SAME_CURRENT_PASSWORD',
};
export const PASSWORD_IS_LESS = {
message: {
en: 'Passwords must be more than 8 characters',
th: 'รหัสผ่านต้องมากกว่า 8 ตัวอักษร',
},
code: 'PASSWORD_IS_LESS',
};
export const EMAIL_ALREADY_EXIST = {
message: {
en: 'This email already exists, please try again',
th: 'มี email น๊้อยู่ในระบบอยู่แล้ว กรุณาลองอีกครั้ง',
},
code: 'EMAIL_ALREADY_EXIST',
};
export const INVALID_PASSWORD = {
message: {
en: 'Invalid password',
th: 'รหัสผ่านไม่ถูกต้อง',
},
code: 'INVALID_PASSWORD',
};
export const INVALID_EMAIL_OR_PASSWORD = {
message: {
en: 'Invalid email or password',
th: 'อีเมล หรือ รหัสผ่าน ไม่ถูกต้อง',
},
code: 'INVALID_EMAIL_OR_PASSWORD',
};
export const PASSWORD_NOT_FOUND = {
message: {
en: 'Password not found!',
th: 'ไม่พบรหัสผ่าน',
},
code: 'PASSWORD_NOT_FOUND',
};
export const CONFIRM_PASSWORD_NOT_FOUND = {
message: {
en: 'Confirm password not found!',
th: 'ไม่พบตัวยืนยันรหัสผ่าน',
},
code: 'CONFIRM_PASSWORD_NOT_FOUND',
};
export const USER_NOT_FOUND = {
message: {
en: 'User not found!',
th: 'ไม่พบผู้ใช้งาน',
},
code: 'USER_NOT_FOUND',
};
export const ACCESS_TOKEN_CANNOT_MORE_THAN_REFRESH_TOKEN = {
message: {
en:
'accessTokeExpired should not be more than refreshTokenExpired (Millisecond)',
th:
'accessTokeExpired ไม่ควรมากกว่า refreshTokenExpired (หน่วย Millisecond)',
},
code: 'ACCESS_TOKEN_CANNOT_MORE_THAN_REFRESH_TOKEN',
};
export const CAN_NOT_UPDATE_PERMISSIONS = {
message: {
en: 'Can not update permission.',
th: 'ไม่สามารถอัพเดต permission ได้',
},
code: 'CAN_NOT_UPDATE_PERMISSIONS',
};
export const MUST_AUTH = {
message: {
en: 'must authenticate',
th: 'ต้องได้รับการรับรองความถูกต้อง',
},
code: 'MUST_AUTH',
};
export const TOKEN_EXPIRED = {
message: {
en: 'Token is Expire!',
th: 'Token หมดอายุ',
},
code: 'TOKEN_EXPIRED',
};
export const THIS_NOT_TOKEN = {
message: {
en: 'This is not token!',
th: 'ไม่ใช่ token',
},
code: 'THIS_NOT_TOKEN',
};
export const TOKEN_IS_INVALID = {
message: {
en: 'Token is invalid',
th: 'Token ไม่ถูกต้อง',
},
code: 'TOKEN_IS_INVALID',
};
export const THIS_NOT_ACCESS_TOKEN = {
message: {
en: 'This is not access token!',
th: 'ไม่ใช่ access token',
},
code: 'THIS_NOT_ACCESS_TOKEN',
};
export const THIS_NOT_REFRESH_TOKEN = {
message: {
en: 'This is not refresh token!',
th: 'ไม่ใช่ refrest token',
},
code: 'THIS_NOT_REFRESH_TOKEN',
};
export const FILE_TOO_LARGE = {
message: {
en: 'File too large',
th: 'ขนาดไฟล์ ใหญ่เกินไป',
},
code: 'FILE_TOO_LARGE',
};