Skip to content

Commit ccd86ea

Browse files
committed
fix: error message auth service
1 parent 557247a commit ccd86ea

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/controllers/Auth/service.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ const expiresToken = 7 * 24 * 60 * 60 // 7 Days
2020

2121
/*
2222
Create the main directory
23-
direktori akan dibikin otomatis ketika login,
24-
karna direktori ada yang menggunakan User ID
23+
The directory will be created automatically when logged in,
24+
because there is a directory that uses a User ID
2525
*/
2626
async function createDirectory(UserId: string) {
2727
const pathDirectory = [
@@ -75,7 +75,7 @@ class AuthService {
7575

7676
readHTMLFile(pathTemplate, (error: Error, html: any) => {
7777
if (error) {
78-
throw new ResponseError.NotFound('Email Template tidak ditemukan!')
78+
throw new ResponseError.NotFound('email template not found')
7979
}
8080

8181
const template = handlebars.compile(html)
@@ -85,7 +85,7 @@ class AuthService {
8585

8686
return {
8787
message:
88-
'Registrasi berhasil, Check email Anda untuk langkah selanjutnya!',
88+
'registration is successful, check your email for the next steps',
8989
data,
9090
}
9191
}
@@ -100,7 +100,7 @@ class AuthService {
100100
})
101101

102102
if (!userData) {
103-
throw new ResponseError.NotFound('Data tidak ditemukan!')
103+
throw new ResponseError.NotFound('data not found or has been deleted')
104104
}
105105

106106
/* User active proses login */
@@ -134,12 +134,12 @@ class AuthService {
134134
}
135135
}
136136

137-
throw new ResponseError.BadRequest('Email atau password salah!')
137+
throw new ResponseError.BadRequest('incorrect email or password!')
138138
}
139139

140140
/* User not active return error confirm email */
141141
throw new ResponseError.BadRequest(
142-
'Please check your email account to verify your email and continue the registration process.'
142+
'please check your email account to verify your email and continue the registration process.'
143143
)
144144
}
145145

0 commit comments

Comments
 (0)