File tree Expand file tree Collapse file tree 1 file changed +17
-17
lines changed Expand file tree Collapse file tree 1 file changed +17
-17
lines changed Original file line number Diff line number Diff line change @@ -20,19 +20,19 @@ dotenv.config();
2020 * EmailSendedResponse adalah struktur response data balikan dari Gmail API
2121 * ketika email konfirmasi berhasil dikirim
2222 */
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 ;
3030 envelope : {
31- from : string
32- to : string [ ]
33- }
34- messageId : string
35- }
31+ from : string ;
32+ to : string [ ] ;
33+ } ;
34+ messageId : string ;
35+ } ;
3636
3737/*
3838 * RegConfirmBody adalah struktur request body yang akan dikirim oleh frontend
@@ -41,10 +41,10 @@ interface EmailSendedResponse {
4141 * Struktur RegConfirmBody disini HARUS MIRIP dengan
4242 * struktur RegConfirmBody yang ada di projek frontend
4343 */
44- interface RegConfirmBody {
45- destEmail : string
46- confirmationURL : string
47- }
44+ type RegConfirmBody = {
45+ destEmail : string ;
46+ confirmationURL : string ;
47+ } ;
4848
4949/*
5050 * Gmailer Middleware
@@ -58,7 +58,7 @@ interface RegConfirmBody {
5858 */
5959app . use ( async ( req , res ) => {
6060 try {
61- const { destEmail, confirmationURL } = ( req . body as RegConfirmBody ) ;
61+ const { destEmail, confirmationURL } = req . body as RegConfirmBody ;
6262
6363 const emailTemplate = await ejs . renderFile (
6464 Path . join ( __dirname , '/templates/confirmation.ejs' ) ,
You can’t perform that action at this time.
0 commit comments