| 123456789101112131415161718 | 
							- const axios = require('../utils/axios')
 
- const kontakModel = require('../model/kontak.model')
 
- exports.notifWA = async (templateId, data, where = {}) => {
 
-   const kontak = await kontakModel.find(where)
 
-   const contacts = kontak.map((e) => {
 
-     return { name: e.nama, number: e.no_hp }
 
-   })
 
-   const send = await axios.post(
 
-     'https://api.kemdikbud.go.id:8243/qontak/1.0/send',
 
-     {
 
-       templateId,
 
-       contacts,
 
-       body: data,
 
-     }
 
-   )
 
-   return send
 
- }
 
 
  |