File tree 1 file changed +17
-17
lines changed
1 file changed +17
-17
lines changed Original file line number Diff line number Diff line change @@ -20,19 +20,19 @@ dotenv.config();
20
20
* EmailSendedResponse adalah struktur response data balikan dari Gmail API
21
21
* ketika email konfirmasi berhasil dikirim
22
22
*/
23
- interface EmailSendedResponse {
24
- accepted : string [ ]
25
- rejected : string [ ]
26
- envelopeTime : number
27
- messageTime : number
28
- messageSize : number
29
- response : string
23
+ type EmailSendedResponse = {
24
+ accepted : string [ ] ;
25
+ rejected : string [ ] ;
26
+ envelopeTime : number ;
27
+ messageTime : number ;
28
+ messageSize : number ;
29
+ response : string ;
30
30
envelope : {
31
- from : string
32
- to : string [ ]
33
- }
34
- messageId : string
35
- }
31
+ from : string ;
32
+ to : string [ ] ;
33
+ } ;
34
+ messageId : string ;
35
+ } ;
36
36
37
37
/*
38
38
* RegConfirmBody adalah struktur request body yang akan dikirim oleh frontend
@@ -41,10 +41,10 @@ interface EmailSendedResponse {
41
41
* Struktur RegConfirmBody disini HARUS MIRIP dengan
42
42
* struktur RegConfirmBody yang ada di projek frontend
43
43
*/
44
- interface RegConfirmBody {
45
- destEmail : string
46
- confirmationURL : string
47
- }
44
+ type RegConfirmBody = {
45
+ destEmail : string ;
46
+ confirmationURL : string ;
47
+ } ;
48
48
49
49
/*
50
50
* Gmailer Middleware
@@ -58,7 +58,7 @@ interface RegConfirmBody {
58
58
*/
59
59
app . use ( async ( req , res ) => {
60
60
try {
61
- const { destEmail, confirmationURL } = ( req . body as RegConfirmBody ) ;
61
+ const { destEmail, confirmationURL } = req . body as RegConfirmBody ;
62
62
63
63
const emailTemplate = await ejs . renderFile (
64
64
Path . join ( __dirname , '/templates/confirmation.ejs' ) ,
You can’t perform that action at this time.
0 commit comments