wa_strapi
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

18 satır
449 B

  1. 'use strict';
  2. /**
  3. * Read the documentation (https://strapi.io/documentation/developer-docs/latest/concepts/services.html#core-services)
  4. * to customize this service
  5. */
  6. module.exports = {
  7. distinctbyKey: async (params) =>{
  8. const results = await strapi.query('message').find(params);
  9. let arrKeys = [];
  10. results.forEach((i)=>{
  11. if(!arrKeys.includes(i["session_datum_key"])) arrKeys.push(i["session_datum_key"]);
  12. });
  13. return arrKeys
  14. }
  15. };